How can I link using PageID?
Asked by Kevin.Jones:

I am adding links in Confluence 6.4 to other Confluence pages in the same space. In some contexts (like a draw.io add on) the links that I select on the Insert Link dialog will use the pageID. For example, URL = [/pages/viewpage.action?pageId=17534079](https://confl.tylertech.com/pages/viewpage.action?pageId=17534079).

If I go to a Confluence page and click on the chain icon at the top to add a link, the Insert Link dialog appears and I find the page to link (just as I did above), but now the link is saved at the "pretty" link using the name, not the pageID.

Example is URL = \<our confluence site\>.../display/COPM/1.4-Project+Kickoffs

If that name changes or moves the link breaks, so I want to always use the pageid link approach. How do I make that happen? I can't find a way that I have any control over that. Am I missing a setting?

Thanks in advance for your help. It will save the frustration of all of the dead links that we have to fix today.


Answers:
author: Lava Kumar Dukanam
body: Hi [@Kevin.Jones](/t5/user/viewprofilepage/user-id/2212314),

If you just want to link to the page then you just have to use the tiny link (permalink). You can find this from looking at the [page information](https://confluence.atlassian.com/doc/view-page-information-139408.html?_ga=2.155831803.1547734219.1540798677-278622557.1538561087).

Hope this helps!

Thanks,  
Lava

comments: author: Rapha?l_Biet
body: I don't think that this answers the problem

I have a similar issue, where there's an inconsistency in the navigation

I have 2 pages, that are under the same page. When I open the 1st one, the URL in my navigator is always the page ID, and the other one is always the page name

it's much easier to link document to the page ID, since it wont break until the page is deleted, and in our process we change pages name quite often (not every day, but still it's an issue for me)

I don't know if I can get the page ID somewhere, and my preferred solution would be to always have the page ID


author: Ross Ursula
body: This is exactly the problem I have! The URL in my navigator is sometimes the page ID and sometimes the page name and I do not understand where I can change that.

My preferred solution would also be the page ID, since I have links from our website to pages/documents in confluence. Otherwise, if someone chanches the name of the page, the link doesn?t work anymore and I have always to change the link in our CMS.

Unfortunately, the page information does not show the page id :(


author: Ross Ursula
body: I just noticed, if you have a page saved with page name and you go to VIEW STORAGE FORMAT, you will find the page ID in the URL!


author: Mattia Fracassini
body: This seems like a pretty big issue.  
A lot of places I have worked use Confluence as their WIKI or Source of truth.  
If a page needs to migrate, move or be archived and an audit happens and the link is broken that's bad JUJU for everyone....  
And to hit K on a page and finding the link every time you want to link to anything is a pretty hard solution if you already have a massive space setup full of pages...


author: Ross Ursula
body: Actually you always find the page ID also in the URL when you go to "page information" (unfortunately not on the information page itself)


author: Colm Maguire
body: Open your source page ( page to be edited with the link) and your target page

On the target page under the 3 dots on the top right, beside share, click page info.

<br />

Copy paste the url into note pad. It will look like this

<https://wiki.kfplc.com/pages/viewinfo.action?pageId=xxxxxxx>

Change the viewinfo to viewpage in your copied url.

Now it looks like this <https://wiki.kfplc.com/pages/viewpage.action?pageId=xxxxxxxx>

On your source page use this new url to link to your target page

<br />

Save and if the target page changes name, the link will never break.


author: Thierry Dalon
body: I think it might be configurable maybe a admin server setting because I have seen servers using by default pretty links and others links by pageid as URL used when you view a page.

To cope these when sharing links I use this: <https://tdalon.blogspot.com/2021/04/confluence-share-link.html>

comments: author: eddie_patton
body: I get "Sorry, the page you were looking for in this blog does not exist." when clicking on the above link.


author: Thierry Dalon
body: link shall work again now


Tags: link

page-id