How to customize the Page Not Found (404) page

Still need help?

The Atlassian Community is here for you.

Ask the community

Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.

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

The content on this page includes steps to customize or extend Atlassian software (adding/changing CSS rules, HTML, JavaScript, etc.). Per the Atlassian Support Offerings, support does not include customizations made to Atlassian products. Be aware that this material is provided for your information only and using it is done so at your risk.

If you have any questions about this or any customization, please ask the community at Atlassian Answers or consider working with an Atlassian Solution Partner.

Purpose

To customize the 404 error page served by Confluence, in order to better fit the design of your site.

Solution

Modify '404.vm'

Find the file 404.vm that's located in <CONFLUENCE-INSTALLATION-PATH>/confluence directory. (see Velocity Template Overview for further information about Velocity template language)

Create a Custom .jsp and Modify 'web.xml'

Find the file web.xml that's located in <CONFLUENCE-INSTALLATION-PATH>/confluence/WEB-INF directory. Edit the file and find the following line:

<error-page>
        <error-code>404</error-code>
        <location>/fourohfour.action</location>
</error-page>

Replace the fourohfour.action with the new custom .jsp page that you created. The default path is <CONFLUENCE-INSTALLATION-PATH>/confluence/.

 

Last modified on Apr 25, 2016

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.