Temporary Site Ban
What It Means
Block code TMP022. Your site returned more error responses to requests from a single IP address than the WAF allows, so that IP address was blocked from your site for about 30 minutes. The ban ends on its own.
Why It Matters
Bots and attackers often try to force a site into errors, hoping an error page will reveal configuration details or credentials. This ban stops an IP address whose requests keep producing errors. The errors that count are HTTP 4xx and 5xx responses from your application:
- 5xx responses: server errors such as 500, 502 or 503. A page or API endpoint that fails repeatedly for one user can trigger the ban even though the user did nothing wrong.
- 4xx responses: requests your app rejects, such as 401, 403, 404 or 422. Requests the browser cancels before they finish count too, which happens when a page starts several requests and the user navigates away.
How fast the requests arrive matters only because a quick burst reaches the limit sooner. Fast traffic that gets successful responses doesn’t trigger this ban.
We can’t share the exact limit: it changes often enough that publishing it would only invite people to try to game it. It also can’t be raised for a particular site.
Only the first few blocked requests appear in your logs. The requests that returned errors and set off the ban are not logged, because they weren’t blocked. While the ban lasts, further requests from that IP are refused without a log entry, so a short burst of these entries can mean a longer outage for that visitor.
Common Triggers
- A page or endpoint that returns server errors (500, 502, 503) for a particular user or record
- A single-page app that polls an endpoint that returns 401 or 404, for example after a session expires
- A page that starts many requests at once and cancels them when the user moves on
- A script or integration that retries quickly after an error
- Security scanners and bots requesting pages that don’t exist (this is the ban working as intended)
What To Do
You don’t need to do anything to lift the ban: it expires after about 30 minutes.
To stop it happening again, clean up 4xx and 5xx responses wherever you can. Scanners and bots requesting pages that don’t exist are expected to get 404s, and you don’t need to change those. Look in your application’s logs for 4xx and 5xx responses to the blocked IP address in the minutes before the first blocked request. On Heroku, the router logs show the status of every request, and requests the browser cancelled appear as H27 (Client Request Interrupted).
If a trusted IP address keeps getting this ban, you can add it on the IP Rules > Allow IPs page. Examples are your office or a partner’s server. See Blocking IP Addresses for managing IP rules. An allowlisted IP skips the WAF’s checks on your site, so only add addresses you trust. Don’t allowlist an address many people share, such as a mobile carrier or satellite internet address, or a wide range from a cloud provider. That lets everyone on it through. Once an IP is allowlisted:
- It doesn’t get new bans of this kind on your site.
- A ban already in place isn’t lifted. It runs out on its own.
- It can still get this ban on other sites where it isn’t allowlisted.
Allowed URL paths don’t prevent this ban. Requests to an allowed path that return errors still count toward the limit.
For a ban that covers every site on the service, see Temporary Service Ban.