# Anchor links on same page?

**URL:** <https://forum.ghost.org/t/anchor-links-on-same-page/28337>\
**Category:** Using Ghost\
**Created:** [February 4, 2022, 7:08pm UTC](https://forum.ghost.org/t/anchor-links-on-same-page/28337 "2022-02-04T19:08:22Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![annmarie](https://avatars.discourse-cdn.com/v4/letter/a/a9adbd/32.png) [@annmarie](https://forum.ghost.org/u/annmarie)\
**Post date:** [February 4, 2022, 7:08pm UTC](https://forum.ghost.org/t/anchor-links-on-same-page/28337/1 "2022-02-04T19:08:23Z")

</div>

Hello, I’m posting recipes on my Ghost blog. I want to do jump links that link to the recipe at the bottom of the post.

I’ve searched the forum and online and I found the answer BUT I don’t know how to implement it.

I can see that it works on his site but I don’t know how to get it to work on my site.

Can someone please explain in plain English how to do this? I am a former HTML developer and have been blogging on Wordpress for over a decade but I am not very familiar with Ghost.

> **[Ghost blog - How to link to a headline within markdown using an anchor](https://peterdaugaardrasmussen.com/2020/12/19/ghost-blog-how-to-make-a-link-to-a-headline/)**
>
> In this post I show how you can add a link to a headline within markdown on your Ghost blog. All you need is a normal link prefixed with # and the headline.

Thank you

---

<div class="post-metadata">

**Author:** ![Kym](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/kym/32/1136_2.png) [@Kym](https://forum.ghost.org/u/Kym)\
**Post date:** [February 4, 2022, 9:24pm UTC](https://forum.ghost.org/t/anchor-links-on-same-page/28337/2 "2022-02-04T21:24:12Z")

</div>

If you add a heading to the section you want to add a jump link to (e.g. “Recipe”) then you can use that heading in the URL to create your link, like this:

`yoursite.com/article/#recipe`

If the heading has more than one word, use - to separate. Here’s an example from a real site: `https://demo.ghost.io/design/#installing-ghost-themes`

---

<div class="post-metadata">

**Author:** ![annmarie](https://avatars.discourse-cdn.com/v4/letter/a/a9adbd/32.png) [@annmarie](https://forum.ghost.org/u/annmarie)\
**Post date:** [February 5, 2022, 7:25pm UTC](https://forum.ghost.org/t/anchor-links-on-same-page/28337/3 "2022-02-05T19:25:37Z")

</div>

Thanks for your quick response.

I understand how to make the link. How do I add the tag for the heading?

Here is the link I made: [https://yoursite.com/test/#mushroomscalloprisottorecipe](https://yoursite.com/test/#mushroomscalloprisottorecipe)

Now how do I create the anchor that it links to?

Normally in HTML the anchor looks like this:

---

<div class="post-metadata">

**Author:** ![Kym](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/kym/32/1136_2.png) [@Kym](https://forum.ghost.org/u/Kym)\
**Post date:** [February 5, 2022, 11:38pm UTC](https://forum.ghost.org/t/anchor-links-on-same-page/28337/4 "2022-02-05T23:38:19Z")

</div>

Ghost automatically allows you to make jump links with _all_ headings in your posts. You just use the `#` identifier at the end of the URL to link to a specific section of your article, followed by the heading itself.

You need to swap out `yoursite.com/test/` for the actual URL of your post, followed by the heading. If the heading is **Mushroom Scallop Risotto Recipe** , then it should be `#mushroom-scallop-risotto-recipe` at the end of the link.

---

<div class="post-metadata">

**Author:** ![annmarie](https://avatars.discourse-cdn.com/v4/letter/a/a9adbd/32.png) [@annmarie](https://forum.ghost.org/u/annmarie)\
**Post date:** [February 6, 2022, 8:35pm UTC](https://forum.ghost.org/t/anchor-links-on-same-page/28337/5 "2022-02-06T20:35:36Z")

</div>

Thank you Kym!

I tried it and it still did not work.

What am I doing wrong? I’m sure it’s something really stupid but I can’t figure it out.

> **[Easy Mushroom Scallop Risotto](https://www.annmariemichaels.com/easy-mushroom-scallop-risotto/)**
>
> Everyone thinks risotto is hard to make, but it's very easy. And it's so impressive and delicious. In this recipe for Easy Mushroom Scallop Risotto, I show you how simple it is.

Thank you in advance!

---

<div class="post-metadata">

**Author:** ![Kym](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/kym/32/1136_2.png) [@Kym](https://forum.ghost.org/u/Kym)\
**Post date:** [February 6, 2022, 10:06pm UTC](https://forum.ghost.org/t/anchor-links-on-same-page/28337/6 "2022-02-06T22:06:05Z")

</div>

`https://www.annmariemichaels.com/easy-mushroom-scallop-risotto/#easy-mushroom-scallop-risotto-recipe`

I just tested it using this heading from your post, and it works for me with the above URL.

---

<div class="post-metadata">

**Author:** ![annmarie](https://avatars.discourse-cdn.com/v4/letter/a/a9adbd/32.png) [@annmarie](https://forum.ghost.org/u/annmarie)\
**Post date:** [February 7, 2022, 3:50pm UTC](https://forum.ghost.org/t/anchor-links-on-same-page/28337/7 "2022-02-07T15:50:37Z")

</div>

Are you saying it works for you? When I try to click the link in Chrome or Brave or Safari, nothing happens.

If I hold down the link on some browsers, it will open in a new tab.

Very odd. Is it supposed to do this? How do I make the link automatically click to the link instead of having to hold down?

Thanks.

---

<div class="post-metadata">

**Author:** ![Kym](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/kym/32/1136_2.png) [@Kym](https://forum.ghost.org/u/Kym)\
**Post date:** [February 8, 2022, 1:17am UTC](https://forum.ghost.org/t/anchor-links-on-same-page/28337/8 "2022-02-08T01:17:47Z")

</div>

You need to copy and paste the URL I shared above into your browser to see it jump to the relevant heading within your article.

I shared the link this way to prevent the forum software from turning it into a bookmark card - so you could see how the URL needs to be compiled.

---

<div class="post-metadata">

**Author:** ![annmarie](https://avatars.discourse-cdn.com/v4/letter/a/a9adbd/32.png) [@annmarie](https://forum.ghost.org/u/annmarie)\
**Post date:** [February 8, 2022, 2:58pm UTC](https://forum.ghost.org/t/anchor-links-on-same-page/28337/9 "2022-02-08T14:58:12Z")

</div>

> [@Kym](#):
>
> [Easy Mushroom Scallop Risotto](https://www.annmariemichaels.com/easy-mushroom-scallop-risotto/#easy-mushroom-scallop-risotto-recipe)

OK thanks. I put it into the browser url bar and it worked. However, it is still not working on my post. How do I add it to the post so it works?

As you can see, I added it twice to the post now – still doesn’t work.

> **[Easy Mushroom Scallop Risotto](https://www.annmariemichaels.com/easy-mushroom-scallop-risotto/)**
>
> Everyone thinks risotto is hard to make, but it's very easy. And it's so impressive and delicious. In this recipe for Easy Mushroom Scallop Risotto, I show you how simple it is.

---

<div class="post-metadata">

**Author:** ![Kevin](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/kevin/32/32_2.png) [@Kevin](https://forum.ghost.org/u/Kevin)\
**Post date:** [February 8, 2022, 3:34pm UTC](https://forum.ghost.org/t/anchor-links-on-same-page/28337/10 "2022-02-08T15:34:46Z")

</div>

@annmarie you’ve added your heading manually using a HTML card - in that case you won’t have an `id` automatically generated for you compared to using the built-in headers.

 ![Screenshot 2022-02-08 at 15.32.22](https://us1.discourse-cdn.com/flex015/uploads/ghost2/original/3X/d/f/dfa9072c84f31a515a8a4dd3c6846367fc45cfd6.png)

In this case because you’ve given your own id, the internal link would be `#mushroomscalloprisotto` or if you’re linking from an external site https://www.annmariemichaels.com/easy-mushroom-scallop-risotto/#mushroomscalloprisotto

---

<div class="post-metadata">

**Author:** ![Nam](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/nam/32/25701_2.png) [@Nam](https://forum.ghost.org/u/Nam)\
**Post date:** [August 2, 2023, 10:08pm UTC](https://forum.ghost.org/t/anchor-links-on-same-page/28337/11 "2023-08-02T22:08:37Z")

</div>

I’m trying this as well however my Heading already has dashes in it for example  
The Brand Gap - Marty Neumeier  
so how do I handle anchors since I was testing and it didn’t seem to work using #The-Brand-Gap—Marty Neumeier

Also how do I use the URL in the link if it’s still in preview with a preview URL can this only be don’t after the page is published?

---

<div class="post-metadata">

**Author:** ![Cathy\_Sarisky](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/cathy_sarisky/32/25750_2.png) [@Cathy\_Sarisky](https://forum.ghost.org/u/Cathy_Sarisky)\
**Post date:** [August 2, 2023, 10:20pm UTC](https://forum.ghost.org/t/anchor-links-on-same-page/28337/12 "2023-08-02T22:20:13Z")

</div>

Hey Nam, welcome to Ghost!

When you preview the post, you can see exactly how dashes and such have been handled. You can also put in the URL as just `#your-heading` for the link (as long as it is on the same page), so it doesn’t matter that the page link is going to change when you publish.

I just checked hyphens. My heading was `My big heading - with a hyphen`, and Ghost gave me an anchor of `my-big-headingwith-a-hyphen`. Which is a little quirky, but certainly something you could get used to.

---

<div class="post-metadata">

**Author:** ![Nam](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/nam/32/25701_2.png) [@Nam](https://forum.ghost.org/u/Nam)\
**Post date:** [August 2, 2023, 11:25pm UTC](https://forum.ghost.org/t/anchor-links-on-same-page/28337/13 "2023-08-02T23:25:51Z")

</div>

I see yea that worked, i had to inspect the titles to get the correct ID, seems like it also removes periods and other punctuations.

---

<div class="post-metadata">

**Author:** ![Cathy\_Sarisky](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/cathy_sarisky/32/25750_2.png) [@Cathy\_Sarisky](https://forum.ghost.org/u/Cathy_Sarisky)\
**Post date:** [August 2, 2023, 11:26pm UTC](https://forum.ghost.org/t/anchor-links-on-same-page/28337/14 "2023-08-02T23:26:31Z")

</div>

Yep! It’s got to make a string that’s a legal url.

---

<div class="post-metadata">

**Author:** ![Mike\_Blumenthal](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/mike_blumenthal/32/25867_2.png) [@Mike\_Blumenthal](https://forum.ghost.org/u/Mike_Blumenthal)\
**Post date:** [December 6, 2023, 7:54pm UTC](https://forum.ghost.org/t/anchor-links-on-same-page/28337/15 "2023-12-06T19:54:01Z")

</div>

1- I have found that this works but any caps in the heading need to become lower case.

2- The resultant URL lands below the heading and the heading isn’t visible. Is there a way to have it anchor above the heading or at the heading rather than below it?  
Example: [Do Searchers Use Pack Results?, LSA Review Abuses, Google's Failed Review Moderation](https://www.nearmedia.co/searcher-behaviors/#lsa-listings-hijack-reviews)

---

<div class="post-metadata">

**Author:** ![Mike\_Blumenthal](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/mike_blumenthal/32/25867_2.png) [@Mike\_Blumenthal](https://forum.ghost.org/u/Mike_Blumenthal)\
**Post date:** [December 8, 2023, 1:28am UTC](https://forum.ghost.org/t/anchor-links-on-same-page/28337/16 "2023-12-08T01:28:49Z")

</div>

A recent observation about the anchor not showing the headline that it is link to:

That only occurs on desktop browsers. On mobile browsers it functions correcting and makes the headline visible when the anchor link is selected.

---

<div class="post-metadata">

**Author:** ![truekasun](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/truekasun/32/20164_2.png) [@truekasun](https://forum.ghost.org/u/truekasun)\
**Post date:** [December 16, 2023, 5:03pm UTC](https://forum.ghost.org/t/anchor-links-on-same-page/28337/17 "2023-12-16T17:03:34Z")

</div>

Hi @annmarie Saw your question here on the forum and I get the same question from most of my clients. So, I created a step-by-step guide for those who would like to learn how to do it. I know it seems like there are so many steps involved (for a non tech person), but believe me when you get used to it, it just take a few seconds to do it.

> **[Ghost CMS Internal Linking: The Ultimate Guide to Anchor Links](https://ghostcave.org/a-guide-to-creating-anchor-links-in-ghost-cms/)**
>
> Learn how to create in-page anchor links, improve navigation, and enhance the user experience of your Ghost blog

---

<div class="post-metadata">

**Author:** ![tidd](https://avatars.discourse-cdn.com/v4/letter/t/43a26b/32.png) [@tidd](https://forum.ghost.org/u/tidd)\
**Post date:** [March 17, 2024, 4:06pm UTC](https://forum.ghost.org/t/anchor-links-on-same-page/28337/18 "2024-03-17T16:06:29Z")

</div>

The simplest answer is [here](https://forum.ghost.org/t/how-to-insert-anchor-links-on-same-page/34759), from a previous post.

---

<div class="post-metadata">

**Author:** ![Yumiko](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/yumiko/32/32475_2.png) [@Yumiko](https://forum.ghost.org/u/Yumiko)\
**Post date:** [November 15, 2024, 12:30pm UTC](https://forum.ghost.org/t/anchor-links-on-same-page/28337/19 "2024-11-15T12:30:50Z")

</div>

Hi, creating anchor seems to be challenging on Ghost. I’ve been creating anchor links in my Ghost posts, but when I publish, unrelated characters and numbers get added to the slug, causing errors. E.g.’

> **[Beyond the business plan: essential steps for F&B success in Japan](https://www.small-business-japan.com/p/bd194660-3e60-43c2-88c8-b2af2f59061b/#craft-a-solid-business-plan-and-financial-projections-unless-youre-letting-Gen-AI-run-the-show)**
>
> Tokyo's JR Yoyogi Station's east exit leads to a block packed with izakayas, a diverse range of restaurants such as sushi and Korean BBQ, creating a vibrant atmosphere. Just a short stroll from this scene, you'll find yourself transported to Ireland.

I’ve never added ‘p/bd194660-3e60-43c2-88c8-b2af2f59061b7’ but can’t remove it.  
No matter how much I edit the id, it doesn’t seem to fix it. The errors are inconsistent, sometimes happening and sometimes not. What could be causing this? Or should I just avoid using a lot of anchor links in my posts?  
I’m not tech-savvy, but really want to fix it in any way!  
Thanks in advance for your kind help!

---

<div class="post-metadata">

**Author:** ![Cathy\_Sarisky](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/cathy_sarisky/32/25750_2.png) [@Cathy\_Sarisky](https://forum.ghost.org/u/Cathy_Sarisky)\
**Post date:** [November 15, 2024, 12:40pm UTC](https://forum.ghost.org/t/anchor-links-on-same-page/28337/20 "2024-11-15T12:40:30Z")

</div>

That link is a preview link. When you actually publish, you should get the slug you’ve chosen, or if it is already in use, that slug with -2 appended.

[Next page](https://forum.ghost.org/t/anchor-links-on-same-page/28337.md?page=2)
