logo
search
SharePoint Document Issues

How to Fix External Links Not Working in HTML Uploaded to SharePoint

Phi Hung VoPhi Hung Vo Oct 13, 2026 869 views

Question details

The user needs to resolve an issue where external hyperlinks within a custom HTML file fail to open after the file is uploaded to a SharePoint document library.

How to Fix External Links Not Working in HTML Uploaded to SharePoint
Product
SharePoint
Device & OS
not provided
Scenario
Uploading and viewing a custom HTML file containing external web links in a SharePoint document library.
Observed behavior
Images and icons in the HTML file display correctly, but clicking the external hyperlinks does nothing or results in a failure to navigate.
Before you start

Verify that your HTML file functions correctly by opening it locally in your default web browser before uploading it to the SharePoint environment.

Solution 1Recommended

Validate and Format Links as Absolute HTTPS URLs

Ensure all hyperlinks are properly formatted as absolute URLs to prevent SharePoint from misinterpreting them as broken internal paths.

SharePoint security protocols and HTML sanitization often block improperly formatted or relative URLs in uploaded web files. Using complete, absolute HTTPS URLs is the most reliable way to ensure links open correctly.

1
Inspect the HTML Code

Open your HTML file locally using a plain text editor like Notepad or VS Code and locate all your anchor tags (<a>).

2
Format URLs as Absolute

Verify that the 'href' attribute contains a full HTTPS URL. For example, change href="www.example.com" to href="https://www.example.com".

3
Test the File Externally

Save your code changes, open the HTML file directly in a web browser outside of SharePoint, and click the links to confirm they navigate properly.

4
Re-upload to SharePoint

Navigate to your SharePoint document library, upload the modified HTML file, and click on it to test the external links within the SharePoint environment.

Validate and Format Links as Absolute HTTPS URLs
Tip: Always avoid using JavaScript-based redirects (like onclick events) for links in uploaded HTML files, as SharePoint's NoScript security setting strips these out by default.
Free Microsoft Office alternative

Switch to WPS Office for Seamless Document Management

SharePoint's strict security restrictions on custom HTML and embedded files can be frustrating. If you are looking for a highly compatible, lightweight, and completely free alternative for managing documents without strict local network limitations, WPS Office is an excellent choice.

  1. 1. Download the Installer: Visit the official WPS website and download the free WPS Office suite for your operating system.
  2. 2. Install and Launch: Run the installer, complete the quick setup process, and open the WPS Office workspace.
  3. 3. Manage Documents Securely: Open your Word, Excel, or PDF files to seamlessly read, edit, and navigate embedded hyperlinks without backend server restrictions.
Fully compatible with Microsoft Word, Excel, and PowerPoint formats.Easily insert, manage, and click external hyperlinks in documents without complex security blocks or HTML sanitization.Lightweight application that runs smoothly across Windows, Mac, Linux, iOS, and Android.Completely free to download and use, featuring a highly familiar user interface for seamless migration.
microsoft office alternative - wps office

Frequently Asked Questions

Why does SharePoint block some external links in my HTML file?

SharePoint implements strict security mechanisms, such as HTML sanitization and NoScript settings, to prevent malicious code execution (XSS). This often strips out unverified links, JavaScript-based navigation, or improperly formatted external hyperlinks.

Do relative links work in SharePoint document libraries?

Relative links typically only function correctly when pointing to other files or resources stored within the exact same SharePoint environment. To link to external websites, you must use absolute URLs that begin with HTTPS.

Can I bypass SharePoint's HTML restrictions by renaming the file extension?

No. SharePoint determines how to render and secure files based on server-side configurations. Renaming an HTML file to an ASPX file is generally blocked by default tenant security settings unless custom scripting is explicitly enabled by your SharePoint administrator.