ANS Documentation

Improve This Doc
  • Cloud
  • Domains and DNS management
  • Backup and High Availability
  • eCommerce Stacks
  • Security
    • DDoSX®
      • Setting up DDoSX®, CDN and WAF using SafeDNS
      • Setting up DDoSX®, CDN and WAF using an ALIAS, ANAME or CNAME
      • Access Controls
      • WAF on DDoSX settings
      • Testing your domain on DDoSX
      • Removing a domain from DDoSX®
      • General information / FAQs
      • Troubleshooting
      • IP Ranges
      • TLS1.0 and TLS1.1 disabled on DDoSX®
      • Global Restrictions
      • DDoSX® HTTP Request and Response Headers
      • Custom Error Pages
    • Web Application Firewall
    • Threat Monitoring and Threat Response
    • McAfee Antivirus
    • Vulnerability Scans
    • ANS MDR
    • Keeping Magento secure
    • Keeping WordPress secure
    • Brute Force Attacks
    • CryptoLocker
    • Dirty COW
    • The Logjam attack
    • Meltdown and Spectre
    • Memcached security concerns and reflection/amplification DDoS attacks
    • Wana Decryptor / Wana Decrypt0r 2.0 / WannaCry
    • Log4J Vulnerability
    • Polkit Security Vulnerability CVE-2021-4034
    • CVE-2022-0847 - Dirty Pipe Vulnerability
  • Email
  • Monitoring and usage management
  • Networking
  • Operating systems
  • Webcelerator
  • MyUKFast
  • Home >
  • Security >
  • DDoSX® >
  • Custom Error Pages

Custom Error Pages¶

On occasions DDoSX® might report errors with your site such as not being able to connect to the upstream (502), report an invalid SSL on the origin (502), the upstream takes too long to respond (504), IP or country code blocking (403), WAF blocks (403) or even an internal error on the platform (500).

The platform in these instances will return an error page for each of the above http status code responses. However there may be instances where you might want the above DDoSX® errors to show a different error page.

Adding your custom error page¶

Once you are logged into your ans portal and browse to DDoSX® Protection > Domain > mydomain.example > Advanced Properties

From here you will see the following screen

DDoSX Advanaced Properties

You can paste html into both or either of the two custom error page input boxes and click save changes

CLI¶

# custom_403_error_page
ans ddosx domain property update mydomain.example 42ab5f8b-9265-4206-9b62-80c9514a6b75 --value="<html>Hello, world</html>"

#custom_5xx_error_page
ans ddosx domain property update mydomain.example b092897b-e5d1-4f91-bcb9-7a23138fefd5 --value="<html>Hello, world</html>"
# Output
ans ddosx domain property list mydomain.example
+--------------------------------------+-----------------------+---------------------------+
|                  ID                  |         NAME          |           VALUE           |
+--------------------------------------+-----------------------+---------------------------+
...
| 42ab5f8b-9265-4206-9b62-80c9514a6b75 | custom_403_error_page | <html>Hello, world</html> |
...
| b092897b-e5d1-4f91-bcb9-7a23138fefd5 | custom_5xx_error_page | <html>Hello, world</html> |
...
+--------------------------------------+-----------------------+---------------------------+
# Deploy
ans ddosx domain deploy mydomain.example

Known Limitations¶

  • HTML files limited to 64KB

  • We will only load the error page for error status codes generated by DDoSX® and not origin error responses.

  • There is no support for dynamic error codes and the pages need to be static html

Next Article > Web Application Firewall

  • Useful Links
  • SMB
  • Enterprise
  • Channel
  • Public Sector
  • ANS Data Centres
  • About ANS
  • Careers
  • Blog
  • Get in touch
  •  
  • Sales 0800 458 4545
  • Support 0800 230 0032
  • Get in touch

© ANS Group Limited | Terms and Conditions | Corporate Guidance | Sitemap
ANS Group Limited, registered in England and Wales, company registration number 03176761, registered office 1 Archway, Birley Fields, Manchester M15 5QJ