# Anchor links not working within Discourse - but work from outside the topic

**URL:** https://meta.discourse.org/t/anchor-links-not-working-within-discourse-but-work-from-outside-the-topic/397748
**Category:** Bug
**Created:** [5 maart 2026 om 15:03 UTC](https://meta.discourse.org/t/anchor-links-not-working-within-discourse-but-work-from-outside-the-topic/397748 "2026-03-05T15:03:53Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![AlexVoss](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/alexvoss/32/546169_2.png) [@AlexVoss](https://meta.discourse.org/u/AlexVoss)
#### Post date: [5 maart 2026 om 15:03 UTC](https://meta.discourse.org/t/anchor-links-not-working-within-discourse-but-work-from-outside-the-topic/397748/1 "2026-03-05T15:03:53Z")

</div>

Hi,

I am having problems creating deep links to headings in posts. They work when I open them in a new browser tab or window but in the post itself or in replies they do not. I get to the top of the page when I click them.

To help with reproducing this, I created an [example topic on try.discourse.org](https://try.discourse.org/t/anchor-links-not-working/1499) - but I realize this will go away in a few hours, so will to try to reproduce this here in a moment.

## What I looked at

I searched for previous mentions of this but only found [this reply](https://meta.discourse.org/t/linking-to-a-heading-within-a-post-or-topic/47552/57) on the [Linking to a heading within a post or topic](https://meta.discourse.org/t/linking-to-a-heading-within-a-post-or-topic/47552) guide that seems to point at the same problem. It is relatively recent (Nov 2025).

---

<div class="post-metadata">

### Author: ![AlexVoss](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/alexvoss/32/546169_2.png) [@AlexVoss](https://meta.discourse.org/u/AlexVoss)
#### Post date: [5 maart 2026 om 15:04 UTC](https://meta.discourse.org/t/anchor-links-not-working-within-discourse-but-work-from-outside-the-topic/397748/2 "2026-03-05T15:04:46Z")

</div>

Ok, trying to reproduce this here by linking to the [What I looked at](https://meta.discourse.org/t/anchor-links-not-working-within-discourse-but-work-from-outside/397748#p-1948632-what-i-looked-at-1) heading above.

---

<div class="post-metadata">

### Author: ![Moin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/moin/32/554653_2.png) [@Moin](https://meta.discourse.org/u/Moin)
#### Post date: [5 maart 2026 om 15:11 UTC](https://meta.discourse.org/t/anchor-links-not-working-within-discourse-but-work-from-outside-the-topic/397748/3 "2026-03-05T15:11:17Z")

</div>

Does “outside” refer to outside of the forum or outside of the topic but within the forum?

I wonder if your problem is this bug [Anchors Not Working Across Posts Within Topic](https://meta.discourse.org/t/anchors-not-working-across-posts-within-topic/240512/)

---

<div class="post-metadata">

### Author: ![AlexVoss](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/alexvoss/32/546169_2.png) [@AlexVoss](https://meta.discourse.org/u/AlexVoss)
#### Post date: [5 maart 2026 om 15:27 UTC](https://meta.discourse.org/t/anchor-links-not-working-within-discourse-but-work-from-outside-the-topic/397748/4 "2026-03-05T15:27:43Z")

</div>

Ah, sorry. By “outside” in the title I meant that they work from, say, a notification email. Then I realized they also work when opening a new tab or window. You can see this with the link in my first reply. Clicking on it while already on the page gets to the top of the topic. If you open it in a new tab, it opens with the heading at the top as expected.

As to the previous bug report: unfortunately, none of the links in this work now. Also, it is from 2022 - this is not the kind of edge case bug that goes unfixed for that long?

I hope I am not holding the wrong end of the stick here. I was able to reproduce the problem on `try.discourse.org`, on `meta.discourse.org` as well as our own hosted forum.

---

<div class="post-metadata">

### Author: ![RGJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rgj/32/523185_2.png) [@RGJ](https://meta.discourse.org/u/RGJ)
#### Post date: [5 maart 2026 om 18:37 UTC](https://meta.discourse.org/t/anchor-links-not-working-within-discourse-but-work-from-outside-the-topic/397748/5 "2026-03-05T18:37:59Z")

</div>

Yes, you can repro here by clicking the link with (works) and without (doesn’t work) the control key.  
I suspect this is Ember routing causing issues.

---

<div class="post-metadata">

### Author: ![AlexVoss](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/alexvoss/32/546169_2.png) [@AlexVoss](https://meta.discourse.org/u/AlexVoss)
#### Post date: [5 maart 2026 om 19:51 UTC](https://meta.discourse.org/t/anchor-links-not-working-within-discourse-but-work-from-outside-the-topic/397748/6 "2026-03-05T19:51:04Z")

</div>

Thanks for confirming. I’ve moved this over to the Bug category. Hope that was the right next step.

---

<div class="post-metadata">

### Author: ![renato](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/renato/32/383632_2.png) [@renato](https://meta.discourse.org/u/renato)
#### Post date: [15 maart 2026 om 17:45 UTC](https://meta.discourse.org/t/anchor-links-not-working-within-discourse-but-work-from-outside-the-topic/397748/7 "2026-03-15T17:45:30Z")

</div>

I can’t reproduce this anymore since [UX: scroll anchor holder into view if cloaked by renato · Pull Request #38368 · discourse/discourse · GitHub](https://github.com/discourse/discourse/pull/38368) was merged, I’m scheduling this topic to close but feel free to post if you’re still facing any issues.

---

<div class="post-metadata">

### Author: ![renato](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/renato/32/383632_2.png) [@renato](https://meta.discourse.org/u/renato)
#### Post date: [20 maart 2026 om 17:45 UTC](https://meta.discourse.org/t/anchor-links-not-working-within-discourse-but-work-from-outside-the-topic/397748/8 "2026-03-20T17:45:44Z")

</div>

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.
