CDN 用戶操作
CDN User Guide
CDN User Guide
  • Domain Management
    • Add Domain
    • Batch Modify Upstream
    • Batch Remove Specific Domains
    • Export Site Records
  • Modules
    • Site Certificate
    • Token Auth
    • Custom Header
    • Redirects
    • CORS Setting
    • Proxy Rewrite
  • Site Settings
    • Cache Setting
    • Compress
    • Rates Limit
    • DNS API
    • Ports
  • Firewall
    • Whitelist Setting
    • Blacklist Setting
    • Positions Setting
    • Anti CC Setting
    • Interval Freq. Limit
    • Second Freq. Limit
    • User Agent Setting
  • ACL
  • Block List
  • Error Pages
  • Site Info.
Powered by GitBook
On this page
  • How to Set Up Custom Error Pages?
  • Add Error Page Field Descriptions

Error Pages

PreviousBlock ListNextSite Info.

Last updated 6 months ago

Custom Error Pages allow you to display a non-default error screen when users request incorrect resources or non-existent web pages, thereby enhancing the user experience.

How to Set Up Custom Error Pages?

  • Sites -> Sites Settings -> Error Pages -> Add Error Page

Add Error Page Field Descriptions

  • Code

    • Currently Supported HTTP Codes: 400, 403, 429, 500, 502, 504

  • Type

    • Present Content

      • You can enter text and variables.

    • URL Redirect

      • Redirect to a specified URL, for example: https://example.com/403error.html

    • JavaScript

      • Example:html

        <html>
        <body>
              <meta charset="UTF-8">
              <title>Hello</title>
              <script>
                alert("This is error page")
              </script>
              <p>
                403<br />$hostname<br />$remote_ip
             </p>
        </body>
        </html>
  • Content

    • Supports the following variables; the rest are set according to the type:

      • $hostname displays the node name accessed by the visitor.

      • $remote_ip displays the visitor's IP.