Why can't I create links to headers on the same page?
Asked by Tony Collins:

No matter what I do, I cannot get links to headers on the same page to work. Same is true for links to anchors. I can enter the values in Link dialog, but the resulting link does not allow me to go actually go anywhere. The only available fields in edit more are "Edit" and "Unlink". The "Go To Link" button is grayed out.

Also, typing "\[" in the editor field gives me an error rather than showing possible link candidates. The error is

The markup provided is not valid link markup

Is there some configuration or permission needed in order to create intra page links?


Answers:
author: Ronalds Tilc?ns
body: We are using Atlassian Confluence 6.8.0 and I can simply type \[#header_title\] to place a link to any header on the same page.


author: Daniel Eads {unmonitored account}
body: Hi Tony,

You can use the Table of Contents macro to help you retrieve what the anchor URL for a header is. Just insert a table of contents macro and hover over the link it generates to fetch the URL you'll need to use. In the image below, you'll use the portion after the hash, but put in a hash (#) of your own between the page name and the section you want to link to.

image2015-7-29 12:32:40.png

For example, to make a link to this section from **another** page I would use **UsefulSQLQueries#Read-onlyqueries**as the Link.

Here's the basic rules of using Anchor Links on a **different page** than where the section you're linking to exists:

* The page title and section **are** case-sensitive
* Spaces are stripped. Hyphens are not.
* Any header level is a valid anchor

------------------------------------------------------

You asked specifically about creating anchor links on **the same page**. It's much easier to do that than links from a separate page. The same rules apply:

* Case sensitive
* Spaces are stripped, hyphens are not
* Any header level is a valid anchor

Consider a page (the title doesn't matter if the link is to the same page) where I have a section called "July 2" which would look like this on the page:

July 2 {#toc-hId--1326664780}
-----------------------------

To make a link to this header in the link editor, I just strip the space out between the words and throw a hash in front (generically **#SectionTitle** ):

image2015-7-29 12:51:30.png  
[](https://community.atlassian.com/t5/Confluence-questions/Why-can-t-I-create-links-to-headers-on-the-same-page/qaq-p/87860?attachment-id=11493){#link_1191df138f7bed}  
[](/tnckb94959/attachments/tnckb94959/confluence-questions/14808/1/image2015-7-29%2012%3A32%3A40.png){#display_1191df138f7bed_0}  
[](https://community.atlassian.com/t5/Confluence-questions/Why-can-t-I-create-links-to-headers-on-the-same-page/qaq-p/87860?attachment-id=11494){#link_1191df138f7bed_0}  
[](/tnckb94959/attachments/tnckb94959/confluence-questions/14808/2/image2015-7-29%2012%3A51%3A30.png){#display_1191df138f7bed_2}


author: Tony Collins
body: Unfortunately, this isn't working. The section header references still don't generate working links. When I put a ToC on the page, I notice that it doesn't appear that those links work either. Not sure what's going on here.


author: Daniel Eads {unmonitored account}
body: If you're still having trouble and even the Table of Content links aren't working, I'd:

1. Try with a different browser, just for kicks
2. Open an issue at <http://support.atlassian.com> describing the problem and what browsers you used (you could even link back here to describe what you tried)


Tags: cloud

confluence-cloud