As far as I know, it depends on whether the page name can be safely encoded in the URL.
For instance, if the page name uses Latin characters only and it is relatively short, it is safe and readable in the URL, so Confluence prefers that. But if it is very long or if it uses "more exotic" characters, the URL would become ugly, and Confluence decides to identify the page by its ID.
It is a convention that has been in place since very-very old Confluence versions.
(You can always use the ID in the URL, even when Confluence prefers the name.)
Thank you Aron, that was very helpful!
Can you tell me how I always get the ID in the URL, even when Confluence prefers the name? I can see the ID when I go to "View Storage Format" but I don´t get the document to be saved with the ID in the URL.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ross, I went as far as I looked this up in the Confluence code.
Please see the comment about the logic that chooses between name-based and ID-based URLs:
public static String getPageUrl(AbstractPage page) {
if (page == null || (page.isLatestVersion() && page.getSpace() == null))
return "";
String title = page.getTitle();
// only use simple/nice page url if the page does not contain:
// - non-ASCII characters
// - '+' or '-' characters because these can be picked up by the insert and stripe through filters
// - double quotes (") because orion doesn't play nicely with them (CONF-1287)
// - ends in punctuation (CONFDEV-3995)
if (isSafeTitleForUrl(title) && page.isLatestVersion())
return toDisplayUrl(page);
else
return getIdBasedPageUrl(page);
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Ross Ursula - Page IDs do not change whereas page names can be changed. Page name works fine for searches. I am unsure of your use case, but if it is about automation, you can prefer page ids for page references.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.