How can I redirect a rate-limited request?

You may wish to redirect rate-limited clients elsewhere, either because you wish to display more content than allowed by the 32kB limit for custom responses, or because you wish to show users a custom HTML page and do not want to update each rule individually when changing it.

You can accomplish this with a meta refresh in the response. Because custom HTML cannot be set in the UI, you must add this via the API. In your rule, use the following response block, replacing the URL with wherever you wish to redirect this traffic:

"response": { "content_type": "text/html", "body": "\u003cmeta http-equiv=\"refresh\" content=\"0; url=\" /\u003e"}

Note that the URL you specify will need to be a URL not matched by your rule pattern, and should generally be a cached page that includes cached assets if your rule is intended for DDoS protection.


Not finding what you need?

95% of questions can be answered using the search tool. This is the quickest way to get a response.

Powered by Zendesk