Convert Absolute Links to Confluence Links

Prior to upgrading to recent versions of Confluence, you could have created links to pages in Confluence by copying and pasting the URL from the browser address bar. Even though the link works, there are some problems with that method including:

  • Loss of some features (incoming links, for example)

  • Broken links if you change the title of a page

  • Loss of functionality (changing the base URL, exporting the space to another instance without breaking links)

To avoid these problems, use Convert Absolute Links to Confluence Links to convert links to the correct internal storage format. If any page has links that are required to be updated, a new page version is created, allowing you to roll back if necessary.

Convert Absolute Links to Confluence Links handles links with anchors, but anchors are still difficult to use in Confluence because they contain the page name. If a link with an anchor does not work correctly before running this built-in script, the script will not fix it.

Your base URL must be set correctly for this to work, and the base URL must match the full URLs in the pages. If it does not, then the links do not appear as candidates for rewriting.

Follow these steps to run the built-in script:

  1. Choose one of the following:

    • Select the All Spaces checkbox if you want to run the script on all global spaces.

    • Enter the specific space you want to work with for Spaces.

  2. Select Run.

    You can select Preview instead of Run to view a list of pages and links that are going to be updated.

    Once you select Run, the Results of the script appear.

Confluence includes JavaScript that automatically creates links with the correct internal storage format when you copy the address, but this functionality does not work on existing content. If you have recently upgraded your Confluence instance, you should only need to run Convert Absolute Links to Confluence Links once.