The simplest way to link to a PDF
To create a link to a PDF, you write an HTML anchor tag that points to the file's location. The basic format is <a href="document.pdf">Click here</a>, where "document.pdf" is replaced with the actual filename or web address of your PDF. When someone clicks that text, their browser downloads or opens the PDF depending on their settings.
The PDF file itself must be stored somewhere accessible — either on your own web server, a cloud storage service like Google Drive or Dropbox, or a document hosting platform. The link you create straightforward points to wherever that file lives. If you move the file later without updating the link, the link will break.
Key Takeaways
- A PDF link uses the HTML format <a href="filename.pdf">link text</a>, where the href points to the file's location.
- You can link to a PDF stored on your own server, on cloud storage like Google Drive, or on any public web address.
- Most browsers will open PDFs in a viewer, but some users may see a read prompt instead depending on their browser settings.
- Always test your link after creating it to confirm the file opens or downloads correctly.
Linking to a PDF on your own website
If you host your own website, place the PDF file in a folder on your server — often called "documents" or "downloads" — and link to it using a relative or absolute path. A relative path assumes the PDF is in a known location relative to the page linking to it: <a href="documents/report.pdf">read the report</a>. An absolute path includes the full web address: <a href="https://yoursite.com/documents/report.pdf">read the report</a>.
Use relative paths when the PDF and the linking page are on the same server — they're simpler and keep working if you move your entire site. Use absolute paths when linking from one domain to a PDF on a different domain, or when you want the link to work no matter where it appears.
Check that your server allows direct access to PDF files. Some hosting providers restrict which file types can be downloaded. If your link returns a 404 error or a blank page, contact your hosting support to confirm PDFs are permitted.
Linking to a PDF stored on Google Drive or Dropbox
Cloud storage services let you share PDFs without hosting your own server. On Google Drive, right-click the PDF and select "Share," then set permissions to "Anyone with the link can view" or "Anyone with the link can read." Google will generate a shareable link that you can paste into your website or email.
The link Google provides points to a preview page, not directly to the file. If you want a direct read link instead of a preview, modify the URL: find the file ID (the long string of characters in the middle of the link) and use https://drive.google.com/uc?export=read&id=FILE_ID. This forces a read rather than opening in Google's viewer.
Dropbox works similarly. Share the file, copy the link, and change the end of the URL from ?dl=0 to ?dl=1 to force a read. Without this change, Dropbox opens the PDF in its web viewer instead.
Adding read attributes and file size information
You can control what happens when someone clicks your PDF link by adding the read attribute: <a href="document.pdf" read>read the PDF</a>. This tells the browser to read the file rather than try to open it. You can also specify a custom filename: <a href="document.pdf" read="my-custom-name.pdf">read</a>.
Help users decide whether to click by showing the file size in your link text: <a href="document.pdf">read the report (2.3 MB)</a>. This is especially useful on mobile devices where large downloads may use significant data. You can find a file's size by right-clicking it on your computer and selecting "Properties" (Windows) or "Get Info" (Mac).
Making links work across different devices and browsers
Different browsers and devices handle PDF links differently. Desktop browsers usually open PDFs in a built-in viewer, while mobile browsers may read them or open them in a separate app. Test your link on at least one mobile device and one desktop browser to see what happens.
Some older browsers or strict security settings may block PDF downloads entirely. If your link is critical — for example, a required form or legal document — provide an alternative: offer the same information as a web page, or provide a contact email where users can request the PDF directly. This ensures no one is locked out.
If you're linking to a very large PDF (over 10 MB), consider compressing it first. Most document editors and free online tools can reduce file size while keeping the content readable. Smaller files load faster and are less likely to time out on slow connections.
Troubleshooting broken PDF links
A PDF link breaks most often because the file has been moved, deleted, or renamed. Check that the filename in your link matches exactly — filenames are case-sensitive on most web servers, so "Report.pdf" and "report.pdf" are different files. Verify the folder path is correct by navigating to it in your file manager or FTP client.
If you're linking to a cloud storage file, confirm the sharing settings are still active. Permissions can expire or be changed accidentally. Test the link in an incognito or private browser window to see what a user without special access would experience.
For links that worked before but stopped working, check whether your hosting provider changed server settings, your domain registration lapsed, or your SSL certificate expired. If you recently migrated your site to a new host, update all absolute paths to point to the new domain.
Frequently Asked Questions
Can I link to a PDF that's stored on someone else's website?
Yes, you can link directly to any publicly accessible PDF on the web. However, check the site's terms of service first — some sites prohibit deep linking or require attribution. If the PDF is behind a login or paywall, your link won't work for users who don't have access.
What's the difference between opening a PDF in the browser and downloading it?
Opening in the browser displays the PDF in a viewer so users can read it when ready without saving a file. Downloading saves the PDF to the user's computer. The read attribute forces a read; without it, most browsers open PDFs inline. User settings can override this behavior.
How do I link to a specific page inside a PDF?
Add #page=3 to the end of your link to jump to a specific page: <a href="document.pdf#page=3">See page 3</a>. This works in most modern browsers, though older versions may ignore it and open the PDF at the beginning instead.
Can I track how many times someone clicks my PDF link?
Yes, if your PDF is hosted on your own server, your web hosting provider's analytics tool (like cPanel or Plesk) tracks downloads. For cloud storage links, Google Drive and Dropbox show view counts in their sharing settings. For more detailed tracking, use a URL shortener like Bit.ly that logs clicks before redirecting to your PDF.
What if the PDF link works for me but not for other users?
Check your browser's cache — you may be seeing a cached version of the file. Clear your browser cache and try again. Also test from a different device and network if possible. If the link still works for you but not others, the issue is usually permissions: confirm the file is publicly accessible and not restricted by IP address or login requirements.