Add PDF Files to Websites

Simple steps to add PDF files to websites

PDF on computer screen

Rawpixel / Mockup Photos

You can create PDFs in Adobe Acrobat, convert documents to PDF files in Word, upload hard copies to PDF format when scanning, and more. Sharing these files with your readers makes sense since practically anyone can open them. Add a PDF file to your website for your readers to download or print.

Make Sure PDF Files Are Allowed

Some hosting services don't allow files over a specific size, and some don't allow you to have certain types of data on your website; this might include PDF files. Make sure that what you are about to add to your website is allowed by your web hosting service first. You don't want to get your site shut down for not following the rules or do a lot of work getting ready to add the PDF file to your website only to find out you can't. 

If your hosting service does not allow you to have PDF files on your website, you can get your own domain name for your website or switch to another hosting servicethat does allow PDF files or large files on websites.

Upload PDF File to Your Website

Upload your PDF files to your website using the file upload program that your web hosting service provides. If they don't offer one, then you need to use an FTP program to upload your PDF file to your website.

Find Your PDF File's Address (URL)

Where did you upload the PDF file? Did you add the PDF file to the main folder on your website or to another folder? Or, did you create a new folder on your website just for PDF files? Find the address of the PDF file on your website so you can link to it.

Choose a Location for Your PDF File

Determine what page and where on the page you want to place the link to your PDF.

Find the Location of the PDF File in Your HTML

Look through the code on your webpage until you find the spot where you want to add the link to your PDF file. You may want to add "<p>" before you enter the code for the link to your PDF file, to add a space.

Add the Link to the PDF File

Add the code to the place where you want the link to the PDF file to show up in your HTML code. It's the same link code that you would use for a typical web page link. You can make the text for the PDF file link say anything you want. For example:

  • Freeservers is your website host.
  • The username for your site is sunny.
  • The location of your site is
  • You uploaded the PDF file to the main directory in your file manager on your website
  • The PDF file is called flowers.pdf.
  • The text you want the reader to click on to download the PDF file is "Click here for the PDF file called flowers."
  • Your code will look like this:
    <a href="">Click here for the pdf file called flowers.</a>
  • If you had uploaded the PDF file to a folder called "fun", the code for the link to the PDF file would look like this instead:
    <a href ="">Click here for the pdf file called flowers.</a>

Testing The PDF File Link

If you are creating your website on your computer, verify the link to the PDF file to make sure it works properly before uploading the PDF file to your server. You will need to link to the PDF file on your hard drive like this:

  • The PDF file is located in the My Documents folder.
  • It is called flowers.pdf.
  • The text for the pdf file says, "Click here for the pdf file called flowers."
  • Code is:
    <a href ="file:///C|/My Documents\flowers.pdf">Click here for the pdf file called flowers.</a> 
Was this page helpful?