SharePoint Document Issues

Fix SharePoint Heading Anchor Links Changing During Page Loading

Chanuka GeekiyanageChanuka Geekiyanage Nov 2, 2026 868 views

Question details

Users experience dynamic changing of heading anchor links in SharePoint pages, resulting in broken or unreliable internal page navigation.

How to Fix Changing SharePoint Heading Anchor Links During Page Load
Product
Microsoft SharePoint
Device & OS
not provided
Scenario
Creating internal navigation links to specific headings on a SharePoint page.
Observed behavior
Heading IDs such as #t, #t-2, or #t-77 change dynamically as page content loads asynchronously, causing the anchor links to break or direct users to the wrong page sections.
Before you start

Verify whether you are currently using SharePoint's out-of-the-box heading links, custom HTML web parts, or a scripting solution to generate your page anchors.

Solution 1Recommended

Create Stable Custom HTML Anchors

Bypassing SharePoint's dynamically generated IDs by creating custom, static anchor tags ensures your links remain reliable regardless of page load order.

SharePoint's modern pages dynamically assign IDs to headings. Because parts of the page load asynchronously, these IDs can shift based on loading speed and order. Creating custom HTML anchors resolves this by hardcoding a permanent target ID.

1
Add an Embed web part

Edit your SharePoint page and add an 'Embed' web part right above the section or heading you want to link to.

2
Define the anchor ID

Enter a standard HTML anchor code snippet such as <a id='my-custom-section'></a> into the embed field.

3
Update your navigation links

Update your internal hyperlinks to point to the new custom anchor by appending #my-custom-section to the end of the page URL.

Create Stable Custom HTML Anchors
Permanent Links Established: Using custom HTML anchors guarantees that the ID will not change even if other web parts are added or removed from the page.
Free Microsoft Office alternative

Try WPS Office for Seamless Document Management

While SharePoint handles cloud collaboration, WPS Office offers a powerful, lightweight, and free desktop alternative for your daily tasks. Smoothly edit, format, and share Word, Excel, and PDF files with complete format compatibility and zero hassle.

  1. 1. Download and Install: Get the free WPS Office suite from the official website and install it on your device.
  2. 2. Open your Document: Launch WPS Writer and open your .docx file directly with seamless compatibility.
  3. 3. Add a Permanent Bookmark: Navigate to the Insert tab, click Bookmark, and name your anchor for stable linking within the document.
Fully compatible with Microsoft Word, Excel, and PowerPoint formats (.docx, .xlsx, .pptx).Easily insert permanent bookmarks and hyperlinked anchors in your local documents without dynamic ID shifts.Lightweight software that loads rapidly on both Windows and Mac operating systems.Built-in PDF editor to manage, merge, and convert documents seamlessly.
microsoft office alternative - wps office

Frequently Asked Questions

Why do my SharePoint heading links have numbers like #t-1 or #t-2?

These are dynamically generated IDs assigned by SharePoint's rendering engine. The numbers represent the sequential order in which the headings were loaded on the page. If web parts load at different speeds, these numbers can shift.

Can I manually rename the native heading IDs in SharePoint?

No, SharePoint does not currently provide an out-of-the-box feature to edit or lock the native heading IDs. You must use custom Embed web parts to create permanently named HTML anchor IDs.

Why do my anchor links break when I edit the SharePoint page?

Editing the page can change the structural order of the web parts. When republished, the dynamic heading engine may reassign different numerical IDs to the headings, causing your previous links to point to the wrong location.

Do SharePoint anchor links work on mobile devices?

Yes, native SharePoint anchor links are designed to function across all devices. However, if the page experiences heavy asynchronous loading on slower mobile connections, the dynamic anchor shifts may become more pronounced.