How to Fix Broken Local File Links in a Website PDF
Question details
Users need to ensure hyperlinks pointing to local files within a PDF remain functional after the document is uploaded and published to a website.

- Product
- Device & OS
- not provided
- Scenario
- Publishing a PDF document containing hyperlinks to local files onto a public website or web server.
- Observed behavior
- Links pointing to local computer directories break, fail to open, or get blocked by web browsers for security reasons when accessed online.
Ensure you have access to a web server, cloud storage, or file-hosting service to host the local files online, as external website visitors cannot access files stored on your personal hard drive.
Replace Local File Paths with Web URLs
The most reliable method is to host your linked files online and update the PDF hyperlinks to point to those secure web addresses.
Modern web browsers automatically block links to local computer paths (such as C:/Documents) to protect user security. To make sure your PDF links work for all visitors on your website, the linked resources must be hosted online and linked via standard web URLs (HTTP/HTTPS).
Upload your local files to your website server, a cloud storage platform (like Google Drive or Dropbox), or a dedicated file-hosting service.
Obtain and copy the direct web URL or public sharing link for each uploaded file.
Open your PDF in a PDF editor, locate the broken local links, and access the hyperlink properties.
Change the link action setting from 'Open a File' to 'Open a Web Link' and paste the copied web URL.
Save the updated PDF document and upload it to your website for visitors to access.

Maintain Relative Folder Structures on Your Web Server
If you must use file links instead of standard web URLs, ensure both the PDF and the linked files are uploaded in the exact same relative directory structure.
Easily Edit and Update PDF Hyperlinks with WPS Office
WPS Office provides a comprehensive PDF editing toolkit that lets you quickly replace broken local file paths with secure web URLs, ensuring your documents work perfectly when published online.
- 1. Open your PDF: Launch WPS Office and open the PDF document that needs hyperlink updates.
- 2. Access link editing tools: Navigate to the 'Edit' tab and click on 'Link' to highlight all interactive hyperlinks within the document.
- 3. Modify the URL: Double-click the broken local link, change the link action to 'Open a web page', and paste your new web URL.
- 4. Save the document: Click 'OK' to confirm the changes, then save your updated PDF file for web publishing.

Frequently Asked Questions
Why do PDF links to local files work on my PC but not on the website?
When viewing a PDF locally on your PC, the links point to files physically located on your hard drive. Once the PDF is uploaded to a website, visitors do not have access to your personal computer's files. Additionally, modern browsers block local path execution from web pages for security reasons.
Can I link to a local network drive in a PDF hosted online?
Links pointing to a local network drive (such as a company LAN or intranet server) will only work for users who are actively connected to that specific secure network. External public visitors on the internet will not be able to open those links.
How do I test if my PDF links will work before uploading them to the web?
You can test the robustness of your links by transferring your PDF file to a completely different device, such as a smartphone or a secondary computer, and opening it there. If the links fail to open on the new device, they will also fail when hosted on a website.




