How to update Confluence shortcut links when a base URL has changed

Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.

Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Problem

We have recently made an update to our Confluence base URL. We have several shortcut links configured in the system and would like to update them as they still show the old base URL from the Confluence UI. How can I update these links en masse so that they will continue to function with our new URL?

Cause

The shortcut links are configured in the UI and stored in the database but do not get updated when the base URL changes, especially if the base URL update was a part of an upgrade or migration.

The base URL can be updated in the configured shortcut links via a direct database update.

Always back up your data before making any database modifications. If possible, test any alter, insert, update, or delete SQL commands on a staging server first.

  1. Run the following SQL query to find the shortcut link bandana mappings in the database:

⚠️ Note that the below select query will not find bandana mappings until a custom shortcut link is added. Running the query with the default shortcut links will not pull bandana mappings.

1 2 3 SELECT * FROM bandana WHERE bandanakey LIKE '%atlassian.confluence.shortcut.links%'

2. Here, we are simply updating the bandanavalue column, looking for the old link value and replacing it with the new one. Using the bandanaid from step 1 and replacing the needed parameters for your instance, run the following query to update the old value to the new value:

1 2 3 4 5 UPDATE bandana SET bandanavalue = replace(bandanavalue, 'Old-Confluence-Base-URL', 'New-Confluence-Base-URL') WHERE bandanaid = 'BANDANAID-HERE'

3. Finally, the following statement updates the table dedicated for sidebar links:

1 2 3 4 UPDATE AO_187CCC_SIDEBAR_LINK SET HARDCODED_URL = REPLACE(hardcoded_url, 'Old-Confluence-Base-URL', 'New-Confluence-Base-URL') WHERE hardcoded_url LIKE '%Old-Confluence-Base-URL%';
  • ℹ️ Restart Confluence or flush the cache in General Configuration → Cache Management to have these changes be reflected in the UI.

Updated on April 8, 2025

Still need help?

The Atlassian Community is here for you.