How to force pretty URLs in Confluence?

Marcel_R__Ackermann September 25, 2012

Hi. When using confluence, I find that pages on the top level of a space do always have "pretty" human-readable URLs, like

http://confluence.mydomain.org:8090/display/KEY/Page+Title+Goes+Here

However, pages on the second level and below are always references by a cryptic page id, e.g.

http://confluence.mydomain.org:8090/pages/viewpage.action?pageId=12345

Is there a configuration option where I can tell Confluence to use pretty URLs for each and every page? I know that there is a "tiny" URL for each page, but they are also very cryptic.

Many thanks in advance.

6 answers

1 accepted

1 vote
Answer accepted
Amalia
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 25, 2012

Please refer to the following KB for more info: https://confluence.atlassian.com/display/CONFKB/Confluence+Page+URL's+Contain+pageId+Instead+of+The+Page+Title

There's actually a feature request for that: https://jira.atlassian.com/browse/CONF-11285

Unfortunately, I am not aware of any workarounds for this as of now. FYI, this has affected our FAQ as well, for example: https://confluence.atlassian.com/pages/viewpage.action?pageId=152044582

One of FAQ pages that is not using a question mark: https://confluence.atlassian.com/display/CONFKB/How+To+Create+a+Maintenance+Splash+Page. It uses "How To" instead of "How Do .... ?". Perhaps this could be an option?

Marcel_R__Ackermann October 1, 2012

Thanks for your answer. Unfortounately, the questions are fixed, so changing them to avoid this shortcoming is not an option.

Frankly, looking at the feature request, it is a little bit discouraging too see that small but reasonable feature requests like these are unresolved for more than four years, while new versions and new features are introduced at an ever faster pace.

Robert Lauriston
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 18, 2013

I've opened a feature request for improving the way bug fixes are scheduled:

https://jira.atlassian.com/browse/CONF-32047

James Lenoel September 7, 2016

Anyone visiting this page, the link @Amalia Sanusi helpfully includes has had a name change. It's now called:

https://confluence.atlassian.com/confkb/confluence-page-urls-contain-pageid-instead-of-the-page-title-278692715.html

Like Amir Katz (Outseer) likes this
1 vote
Marcel_R__Ackermann September 25, 2012

Ok, I just found this question https://answers.atlassian.com/questions/87181/nice-urls-only-on-some-confluence-ondemand-pages which is at least in part a duplicate. It seems, thatz special characters (in my case a question mark) lead to the ugly URLS. However, the question remains, whether there is way to force Confluence to use pretty URLs and maybe replace any special character by somethin else?

1 vote
JamieA
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 25, 2012

I don't see that - which version of confluence?

If you use certain characters in the title then you get the pageId, eg colon, semi-colon I think, otherwise you should get a sensible title.

Are you using any plugins? Eg scroll versions - not attempting to cast aspersions here, but I know that it supports multiple pages per space with the same title, so perhaps it gets round that using the pageId (alternately it may just put the version number in the url).

Marcel_R__Ackermann September 25, 2012

Hi Jamie. I am using Confluence 4.2.2.

I am using a pretty fresh installation and have only installed one or two plugins. However, there are a number of plugins listed of which I assume that they have been installed with the distribution (unless our admin has been active without telling me): Advanced Macros, Basic Macros, Code Macro Plugin, Confluence Attachments Plugin,Confluence HTML Macros, Dynamic Task List 2 Plugin, Google Maps Plugin, IM Presence NG Plugin, JIRA Macros, Support Tools Plugin, Tabular Metadata, Widget Connector

My problem really seems to come from the characters in the title. I am writing F.A.Q. pages, so essentially each title contains a question mark (and apostrophes are quite frequent). When I remove them, the pretty URLs appear. However removing the punctuation is not an option.

So my question would be: How to force pretty URLs in the presence of "evil" characters?

0 votes
Dean McGinn September 5, 2018

Hey, 

 

You can use scroll viewports which would enable you to manually decide if you want hierarchical or flat naming convention. It will also mean that you will never see a pesky "viewpage.action" link anymore.

 

We use Viewport for our customer facing Confluence space.

What's best about the Scroll Viewport add-on, is that you get to customise the them seperately to you confluence VM (Velocity macro template file).

This inlcudes a bunch of useful tools and utilities you can harness to do other work, for example, conditional page content, sometimes it's better to not render the HTML at all if the user cannot view it.

0 votes
Alexander Klimetschek October 15, 2015

Confluence should really support nicer URLs that can be remembered by humans (e.g. if someone enters a link in a presentation). Special characters forcing the ugly URL is a no go, using the noisy "+" instead of "-" as placeholder for spaces, as well as having 3 different ways to address a page (1. normal: display/KEY/PAGE 2. pages/viewpage.action?spaceKey=...title=... 3. pages/viewpage.action?pageId=). "display" and "pages"). It should encourage people creating a page to provide a simple URL name and not just take any arbitrary long title text. Github markdowns id generator for headings is a good way for automating that (but still users should be able to customize it). And then support URLs where the space is a subdomain and just the short name is used as path: myspace.confluence.mydomain.org/some-nice-page

0 votes
Marcel_R__Ackermann September 25, 2012

Updated the title to reflect the question better.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events