How to set error pages

Configure your edge application to handle error responses from the origin using Error Responses. Azion allows you to set a cache TTL for error pages, a custom path, or deliver another HTTP code in the response without needing to change the source code of your application.

With this guide, you’ll modify the default error response of your application, setting a cache TTL for each error received from the origin.


  1. Access Azion Console > Edge Application.
  2. Click the edge application you want to configure.
  3. Select the Error Responses tab.

In the Error Responses section, the Status Code field can’t be modified. This field represents every error status code received from the origin. The Default Response TTL field allows you to customize the cache TTL for every status code received.

  1. In Default Response TTL, set the cache time-to-live (TTL), in seconds, for all error pages.
  2. Click the + Error Response button.
  3. In the new Status Code field, select the status code you want to customize. For example: 404.
  4. Add a cache TTL in the Custom Response TTL field.

You can also determine a specific path from your origin that will be delivered to the user and a custom status code in the response. These modifications are optional.

  1. In the Page Path field, add a path to an error page created in the source. For example: /error/404.
  2. In the Response Status Code field, customize the HTTP status that’ll be received by the user.
  3. In the Set Origin section, select the origin of error page URIs.
  4. Click the Save button.

When errors are received from the origin, your edge application will cache and display the error page based on the new configuration.


Contributors