Scroll Sites

Why Does My Heading Link Open at the Top of the Page?

If a link to a heading opens the correct page on your site but starts at the top instead of at the section, the heading was probably reworded after you created the link. To fix it, recreate the link from the heading's current version. For sections you edit often, link to an anchor macro instead, since anchors don't change when you edit a heading.

Symptoms

  • A link opens the correct published page, but at the top rather than at the section

  • It happens most often with links to headings on other pages

  • Links to anchor macros on the same pages work as expected

  • Recreating the link and updating the site fixes it

  1. Open the target page in Confluence.

  2. Hover over the heading and select Copy link to heading.

  3. Open the page that contains the broken link and edit it.

  4. Select the link, then replace its address with the one you copied.

  5. Publish the page.

  6. Update your site.

Open the link on your published site and confirm it lands on the heading.

Use this for sections whose heading you expect to reword, such as feature names that change between releases.

  1. Open the target page in Confluence and edit it.

  2. Insert an Anchor macro directly above or below the heading, and give it a short, stable name, such as setup-guide.

  3. Publish the target page.

  4. On the page with the link, create a link to the anchor.

  5. Publish the page and update your site.

For step-by-step instructions on linking to anchors, see Referencing Content – Best Practices.

Why Does This Happen?

A link to a heading ends with a section ID, the part after #. Your site uses it to find the heading on the published page.

The section ID comes from the heading text. When you reword a heading, it gets a new ID, but existing links keep the old one. Your site can't find a matching heading, so the browser opens the page at the top.

Anchor macros avoid this, because an anchor's name only changes if you change it.

Still Having Issues?

If a recreated link still opens at the top of the page, contact K15t Support. Include the published address of the page with the link, and the link as it appears when you edit it in Confluence.

Last updated: