Fix SharePoint Heading Anchor Links Changing During Page Loading
Question details
Users experience dynamic changing of heading anchor links in SharePoint pages, resulting in broken or unreliable internal page navigation.

- 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.
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.
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.
Edit your SharePoint page and add an 'Embed' web part right above the section or heading you want to link to.
Enter a standard HTML anchor code snippet such as <a id='my-custom-section'></a> into the embed field.
Update your internal hyperlinks to point to the new custom anchor by appending #my-custom-section to the end of the page URL.

Utilize Native SharePoint Heading Links Accurately
Use the built-in anchor icon on modern SharePoint page headings to copy the exact URL intended by the system, rather than guessing the ID.
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. Download and Install: Get the free WPS Office suite from the official website and install it on your device.
- 2. Open your Document: Launch WPS Writer and open your .docx file directly with seamless compatibility.
- 3. Add a Permanent Bookmark: Navigate to the Insert tab, click Bookmark, and name your anchor for stable linking within the document.

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.




