Docs Menu

Docs HomeAtlas App Services

Use a Custom 404 Page

On this page

  • Overview
  • Procedure
  • Create a Custom 404 Page File
  • Host the 404 File in App Services
  • Configure the 404 Resource Path in App Services
  • Pull the Latest Version of Your App
  • Create a Custom 404 Page HTML File
  • Host the HTML File in App Services
  • Specify the 404 Page in the Application Configuration
  • Deploy the Updated Hosting Configuration

You can replace the default 404 page that Atlas App Services displays when a user tries to access a resource that does not exist with a custom HTML document. You can specify this custom 404 page from the App Services UI or by importing an application configuration directory that includes the page in its hosting directory. Select the tab below that corresponds to the method you want to use.

Note

404 Errors in Single-Page Apps

When single-page application hosting is enabled, App Services always returns an HTTP 200 response with the app root regardless of the requested route. This means that you cannot specify a custom 404 page for a SPA. Instead, you should include custom code in your application to handle invalid routes.

←  Upload Content to Atlas App ServicesUse a Custom Domain Name →
Give Feedback
© 2022 MongoDB, Inc.

About

  • Careers
  • Investor Relations
  • Legal Notices
  • Privacy Notices
  • Security Information
  • Trust Center
© 2022 MongoDB, Inc.