Anchor creation instructions incorrect: DO NOT use a space between words.

This question is in reference to Atlassian Documentation: Anchors

After two years of fighting the anchor macro it seems that removing spaces from the anchor name during creation is the key to success.

2 answers

0 vote

Hi Reid, Confluence can successfully link to anchors that have spaces in the anchor name.

I find the most effective way to link to an anchor is to use the Advanced tab in the Link dialog.  There you can enter the following examples to link to an anchor anywhere in your site:

#anchor title
Page Title#anchor title
SPACEKEY:Page Title#anchor title

All three of these examples work (in order they are: same page, another page, page in another space).  

Where it gets tricky is when you are linking from an external site, and need to construct a full URL. This is where Confluence would automatically remove the spaces for you, so you end up with a URL that looks like this:

yoursite.atlassian.net/display/SPACEKEY/Page+Title#pagetitle-anchortitle

Note that the page title is actually repeated in the URL, and the anchor name has spaces removed. 

What I've seen many people do in the past is to add a link to the anchor on the same page, and then copy the URL when viewing the page to make sure they get the correctly rendered URL. 

Hope this helps

 

I assure you, entering a space in the anchor name does NOT work in our installed instance, version 5.9.1

Others in the forum appear to have the same experience.

I have raised a bug for this here https://jira.atlassian.com/browse/CONF-41385  

It would be fantastic if you could comment on the issue and provide an example of the type of link you're using (how you add the link - URL, Advanced tab etc). 

I was not able to replicate your issue in Confluence Cloud, so may be specific to Confluence Server perhaps.  

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Posted Jul 10, 2018 in Confluence

We want to see the templates you've created in Confluence!

Hi Community, Jessica here from the Confluence Product Marketing team!  July’s community challenge is all about sharing pictures  — and as an extension of our first post on what ...

763 views 23 12
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you