How to set error pages

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

There are separate instructions for API v3 using legacy Error Responses settings and API v4 using the new Custom Pages product.

Configure your application to handle error responses from the origin using Custom Pages. 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.


  1. Access Azion Console > Custom Pages.
  2. Click + Custom Page.
  3. In the Page Codes section, click + Custom Page Code to add a page for a chosen status code. For example: 404.
  4. In the new Page Code field, select the status code you want to customize.
  5. In the Connector field, select the Connector that is fetching the data from your origin. 6 In the Page Path field, add a path to an error page created in the source. For example: /error/404.
  6. In Response TTL, set the cache time-to-live (TTL), in seconds.
  7. In the Response Custom Status Code field, customize the HTTP status that’ll be received by the user.
  8. Click the Apply button.

Now let’s bind the Custom Page to your Workload.

  1. Access Azion Console > Workloads.
  2. Edit the desired Workload.
  3. In the Deployment Settings section, select your Custom Page.
  4. Click the Save button.

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