How Do I Add Links to Confluence 5.x's Top Global Header/Navigation Bar?

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

Summary

  1. Navigate to Confluence Admin >> Custom HTML

  2. Click Edit

  3. Add the following to At the end of the HEAD:

    <script> AJS.toInit(function(){ AJS.$('.aui-header-primary .aui-nav').append('<li><a href="http://www.atlassian.com" class=" aui-nav-imagelink">Atlassian</a></li>'); }); </script>

    The example above will add an "Atlassian" link to the top navigation bar

Solution

To add multiple links:

  1. Do the same as for a single link, making sure you follow the same format as below, all additional link items must be on the same line with no hard returns or spaces between them.

<script> AJS.toInit(function(){ AJS.$('.aui-header-primary .aui-nav').append('<li><a href="http://www.atlassian.com" class=" aui-nav-imagelink">Atlassian</a></li><li><a href="http://www.google.com" class=" aui-nav-imagelink">Link2</a></li><li><a href="http://www.google.com" class=" aui-nav-imagelink">Link3</a></li>'); }); </script>

The example above will add two new links "Link2" and "Link3" to the navigation that both link to www.google.com

To add third-party plugin link:

  1. Install the plugin.

  2. Do the same as for a single link, making sure you follow the same format as below.

<script> AJS.toInit(function(){ AJS.$('.aui-header-primary .aui-nav').append('<li><a href="/plugins/targetedsearch/settings/configurefilters.action" title="Search Filters">Search Filters</a></li>'); }); </script>

The example above will add a third-party plugin 'Search Filters' link from "Brikit Targeted Search for Confluence" to the navigation bar.

Updated on May 22, 2025

Still need help?

The Atlassian Community is here for you.