The custom pages feature within the VergeCloud CDN Service enables you to replace or customize various pages of your website, including Error Pages and Under Construction Pages. While these pages initially appear in VergeCloud's standard design, you have the option to upload HTML files or specify URLs to redirect users, enhancing their experience on your site.
Consider a situation where your website experiences downtime for maintenance. You can configure a custom Under Construction page to inform visitors of the ongoing updates while still maintaining a professional appearance.
Navigate to the Custom Pages section in your VergeCloud user panel, located under the CDN section, to manage these pages.
To begin constructing your page, utilize the following custom error template:
<html>
<head></head>
<body>
%desired variable%
</body>
</html>
Note that all external resources, such as images, CSS, and scripts included in your file, must be reachable (i.e., return a 200 OK response) to prevent errors from occurring.
For example, if you have an image file hosted on your domain and you restrict access from specific geographic regions at the domain level, you will need to adjust the paths for your static files to ensure that firewall rules do not interfere, or alternatively, utilize VergeCloud's object storage.
The following table outlines the variables that can be utilized on the error, update, or DDoS protection pages:
Parameter | Description |
---|---|
%IP% | Displays the user’s IP address. |
%SID% | Shows the server ID to which the user is connected. |
%DOMAIN% | Indicates the requested domain. |
%ERRCODE% | Displays the error code. |
%TIME% | Shows the timestamp of the error formatted as: %Y-%m-%d %H:%M:%S %Z. |
%REQUEST_ID% | Displays the request ID. |
%Challenge% | Calls DDoS Protection challenges dynamically. |
The image below illustrates some of the aforementioned values displayed on a 403 error page.
Finally, click on Save to apply the changes.
This feature allows you to select which page visitors will see when the website is undergoing maintenance. Essentially, you can modify the page that users encounter while your site is being updated.
Be aware that by using either the Upload HTML or Redirect options, the "Under Maintenance" mode will be activated across your entire domain.
curl --location --request GET 'https://napi.vergecloud.com/cdn/4.0/domains/example.com/custom-pages' \
--header 'authority: napi.vergecloud.com' \
--header 'accept: application/json, text/plain, */*' \
--header 'authorization: APIKEY ' \
--header 'cache-control: no-cache' \
--form 'file=@"/C:/Users/vergecloud/Desktop/example.html"' \
--form 'page="under_construction"' \
--form 'type="file"'
curl --location --request GET 'https://napi.vergecloud.com/cdn/4.0/domains/example.com/custom-pages' \
--header 'authority: napi.vergecloud.com' \
--header 'accept: application/json, text/plain, */*' \
--header 'authorization: APIKEY 1 2 3 4' \
--header 'cache-control: no-cache' \
--form 'page="under_construction"' \
--form 'url="https://example.com/uc.html"' \
--form 'type="url"'
This error indicates that the primary server is temporarily inaccessible. VergeCloud displays this message by default when the origin server returns any of the 500, 502, 503, or 504 error codes.
In such cases, users will see an error similar to the image below:
curl --location --request GET 'https://napi.vergecloud.com/cdn/4.0/domains/example.com/custom-pages' \
--header 'authority: napi.vergecloud.com' \
--header 'accept: application/json, text/plain, */*' \
--header 'authorization: APIKEY 1 2 3 4' \
--header 'cache-control: no-cache' \
--form 'page="error_500"' \
--form 'url="https://example.com/500"' \
--form 'type="url"'
curl --location --request GET 'https://napi.vergecloud.com/cdn/4.0/domains/example.com/custom-pages' \
--header 'authority: napi.vergecloud.com' \
--header 'accept: application/json, text/plain, */*' \
--header 'authorization: APIKEY 1 2 3 4' \
--header 'cache-control: no-cache' \
--form 'file=@"/C:/Users/vergecloud/Desktop/example.html"' \
--form 'page="error_500"' \
--form 'type="file"'
When activating either the JavaScript or Captcha challenges, a page will be shown to your visitors to verify that they are not automated systems. You can personalize these DDoS challenge pages using Custom Pages.
To create DDoS pages, ensure that you include the %Challenge% variable in the file you upload for the dedicated page.
By default, visitors will see a page like the one below for a JavaScript challenge:
curl --location --request GET 'https://napi.vergecloud.com/cdn/4.0/domains/example.com/custom-pages' \
--header 'authority: napi.vergecloud.com' \
--header 'accept: application/json, text/plain, */*' \
--header 'authorization: APIKEY 1 2 3 4' \
--header 'cache-control: no-cache' \
--form 'file=@"/path/to/file"' \
--form 'page="ddos_js"' \
--form 'type="file"'
By default, visitors will encounter a page like the one below for a Captcha challenge:
curl --location --request GET 'https://napi.vergecloud.com/cdn/4.0/domains/example.com/custom-pages' \
--header 'authority: napi.vergecloud.com' \
--header 'accept: application/json, text/plain, */*' \
--header 'authorization: APIKEY 1 2 3 4' \
--header 'cache-control: no-cache' \
--form 'file=@"/path/to/file"' \
--form 'page="ddos_captcha"' \
--form 'type="file"'
When activating the secure link feature on content, only users utilizing their encrypted and specially generated links can access the specified paths. These restrictions may be applied based on specific IP addresses and access durations.
If the user's identity cannot be validated according to the requested parameters, the following error will be displayed by default:
curl --location --request GET 'https://napi.vergecloud.com/cdn/4.0/domains/example.com/custom-pages' \
--header 'authority: napi.vergecloud.com' \
--header 'accept: application/json, text/plain, */*' \
--header 'authorization: APIKEY 1 2 3 4' \
--header 'cache-control: no-cache' \
--form 'page="secure_link_invalid"' \
--form 'url="https://example.com/securelink"' \
--form 'type="url"'
curl --location --request GET 'https://napi.vergecloud.com/cdn/4.0/domains/example.com/custom-pages' \
--header 'authority: napi.vergecloud.com' \
--header 'accept: application/json, text/plain, */*' \
--header 'authorization: APIKEY 1 2 3 4' \
--header 'cache-control: no-cache' \
--form 'file=@"/C:/Users/vergecloud/Desktop/example.html"' \
--form 'page="secure_link_invalid"' \
--form 'type="file"'
VergeCloud Firewall allows you to define security rules in a cloud environment and manage access to your content with a high level of security through various restrictions. You can designate which page your visitors will see when firewall errors occur.
The default error pages for VergeCloud’s firewall are illustrated below:
curl --location --request GET 'https://napi.vergecloud.com/cdn/4.0/domains/example.com/custom-pages' \
--header 'authority: napi.vergecloud.com' \
--header 'accept: application/json, text/plain, */*' \
--header 'authorization: APIKEY 1 2 3 4' \
--header 'cache-control: no-cache' \
--form 'page="firewall_error"' \
--form 'url="https://example.com/firewall"' \
--form 'type="url"'
curl --location --request GET 'https://napi.vergecloud.com/cdn/4.0/domains/example.com/custom-pages' \
--header 'authority: napi.vergecloud.com' \
--header 'accept: application/json, text/plain, */*' \
--header 'authorization: APIKEY 1 2 3 4' \
--header 'cache-control: no-cache' \
--form 'file=@"/C:/Users/vergecloud/Desktop/example.html"' \
--form 'page="firewall_error"' \
--form 'type="file"'
The Web Application Firewall (WAF) is designed to monitor and block manipulated data packets targeting web applications.
The default error messages for this service are shown below:
curl --location --request GET 'https://napi.vergecloud.com/cdn/4.0/domains/example.com/custom-pages' \
--header 'authority: napi.vergecloud.com' \
--header 'accept: application/json, text/plain, */*' \
--header 'authorization: APIKEY 1 2 3 4' \
--header 'cache-control: no-cache' \
--form 'page="waf_protection"' \
--form 'url="https://example.com/waf"' \
--form 'type="url"'
curl --location --request GET 'https://napi.vergecloud.com/cdn/4.0/domains/example.com/custom-pages' \
--header 'authority: napi.vergecloud.com' \
--header 'accept: application/json, text/plain, */*' \
--header 'authorization: APIKEY 1 2 3 4' \
--header 'cache-control: no-cache' \
--form 'file=@"/C:/Users/vergecloud/Desktop/example.html"' \
--form 'page="waf_protection"' \
--form 'type="file"'
Rate Limiting allows you to control the incoming and outgoing traffic to and from a network by restricting the number of requests a user can send.
If a user exceeds the allowed traffic limits, they will encounter an error, which by default appears as shown below:
curl --location --request GET 'https://napi.vergecloud.com/cdn/4.0/domains/example.com/custom-pages' \
--header 'authority: napi.vergecloud.com' \
--header 'accept: application/json, text/plain, */*' \
--header 'authorization: APIKEY 1 2 3 4' \
--header 'cache-control: no-cache' \
--form 'page="rate_limit_exceeded"' \
--form 'url="https://example.com/rl"' \
--form 'type="url"'
curl --location --request GET 'https://napi.vergecloud.com/cdn/4.0/domains/example.com/custom-pages' \ --header 'authority: napi.vergecloud.com' \ --header 'accept: application/json, text/plain, */*' \ --header 'authorization: APIKEY 1 2 3 4' \ --header 'cache-control: no-cache' \ --form 'file=@"/C:/Users/vergecloud/Desktop/example.html"' \ --form 'page="rate_limit_exceeded"' \ --form 'type="file"'