Documentation Cache Settings Set Custom Error Pages

Set Custom Error Pages

Last update:2026-07-13 18:16:57

When users request content from the origin server, the requested content may not exist or other errors may occur. In such cases, the origin server usually returns a default error page indicating that the request failed. If no custom page is configured, these default error pages are often simple and not user-friendly. When users access content through the Atomile CDN platform, you can configure a custom error page to be returned to users instead of the default origin error page.

On the Atomile CDN platform, you can define multiple error page return rules for a domain based on conditions such as requested file types and response status codes. This allows you to deliver different custom error pages for different request scenarios. If multiple rules match a request, the rule with the higher priority takes effect first.

How to Set a Custom Error Page

  1. Log in to the Atomile Console and select the appropriate product.
  2. Go to Configuration, locate the domain you want to configure, and click Edit Configuration at the top or the Edit button to the right of the domain.
  3. On the configuration page, go to Page Rules and select Custom Error Pages, then click +Add.
  4. On the rule editing page, configure the options as needed.

Effective Range

Option Description
All Requests This rule applies to all requests for the associated domain.
Only Homepage This rule applies only to requests for the root path, for example, http://domain/ or https://domain/.
Specified File Type This rule applies only to requests for specified file types. You can select from the list or enter custom file types. Separate multiple file types with ;, for example, ace;aac.
Specified Directory This rule applies to all requests for specified directories. Each directory must begin and end with / and can include letters, numbers, and certain special characters, such as underscores (_), hyphens (-), percent signs (%), and dots (.). For example, /file/1%1/ applies to requests for http://domain/file/1%1/ and all files under that directory.
Please separate multiple directories with line breaks.

Redirected Status Code

Atomile provides a list of commonly used status codes for quick selection. The current list is: 403;404;500;502;503;504.

In addition to selecting from the list, you can manually enter the response status codes that should trigger error page redirection. Separate multiple status codes with ;, for example, 301;302.

Tips
When multiple status codes are specified, they are matched using OR logic. If the response status code matches any one of the specified values, the rule is applied.

Redirected URL

In this field, enter the full URL of the error page you want to return to the user. The URL must be complete and accessible. Each rule can specify only one URL, for example, http://domain/error.html.

You can also choose whether the configured URL should be case-sensitive by selecting Yes or No.

Priority

In the Priority field, you can specify the priority of the rule. The system matches rules based on the user request. If multiple rules apply, the one with the higher priority is applied first.

After completing the configuration, click OK, and then click Next to submit your settings. To minimize potential disruption to your production environment, we strongly recommend performing a Pre-deploy test in a staging environment. This important step ensures that your configuration is correct before it goes live.

After you confirm that the settings are correct, click Deploy Now to apply them in the live environment. The configuration typically takes effect within 3 to 5 minutes. For more information about pre-deployment testing and validation, refer to Deploy the Configurations to Staging Environment for Validation.

Notes

  • The redirected URL must be complete and accessible.
  • If the redirected URL is not accessible, it may repeatedly trigger the error page redirection rule and result in a redirection loop.
  • In such cases, cyclic redirection requests may be forcibly terminated by the Atomile CDN platform.