Templates

404 page

A 404 page informs users that a requested page doesn’t exist.

About the 404 page template

A 404 page informs users that a requested page doesn’t exist. This kind of error can be frustrating or confusing. Straightforward plain language can help. Use a 404 page to explain the error and instruct the user what to do next.

This 404 page template has six sections. This general structure is also applicable to non-404 error pages as well:

  1. Describe the error: Heading
  2. What caused the error: Lead text
  3. Possible ways to fix the error: Regular text
  4. Actions: Buttons or links
  5. Additional support channels, if available: List
  6. Error code: Small text

Guidance

When to use the 404 page template

  • Page doesn’t exist. Users might navigate to a missing page for a number of reasons:

    • They followed an incorrect link
    • The page was removed from the website
    • They entered a typo into the URL

When to consider something else

  • Other types of errors. Don’t use this template for form validation errors, submission errors, or if a website has been taken down for maintenance.

  • Inline errors. Use alerts or form input errors when displaying errors that occur from interactions on a page.

Usability guidance

  • Use concise, non-technical language. Don’t make the error code a prominent part of the page or get into too many details about what went wrong. Be concise and don’t add unnecessary content just to fill the space.

  • Avoid funny, cutesy, or whimsical error messages. Users might not get the joke or appreciate levity when attempting to access critical information or services. Government website content should always be authoritative and trustworthy.

  • Be apologetic. Show empathy, and don’t blame the user. Use messaging like “We’re sorry, that page can’t be found” instead of “Whoops, you made a mistake.”

  • Let users know what they can do next. This might be advice such as correcting typos in the URL or reporting a problem if they think they’ve reached the 404 page in error. Also, give them a way out of the “dead end” error page by directing them to the homepage, a contact page, a search page, or a chatbot/live chat.

  • Use a consistent layout. The error page should look like your website to avoid confusion. Include the main navigation so that users can navigate directly to another part of the site.

  • Don’t include multiple search boxes. Only include a search option on the error page if there isn’t already a search box in the site’s header or anywhere else on the page.

Using the 404 page template

Components used in this template

Latest updates

Meaningful code and guidance updates are listed in the following table:

Date USWDS version Affects Breaking Description
2023-03-09 N/A
  • Markup
No

Updated template copy to follow parallel structure and use active voice. More information: uswds#5045

2021-06-16 2.12.0
  • Markup
No

Added Spanish variant. More information: uswds#4186

2021-03-17 N/A
  • Markup
No

Added 404 page template. More information: uswds#4003