← Back
Cloudflare
Cloudflare adds Retry-After headers to 1xxx error responses for automatic retry handling

What Changed

Cloudflare now automatically includes the Retry-After HTTP header in responses for seven retryable 1xxx error codes. This standardizes the retry behavior across the platform and makes it easier for HTTP clients and agents to handle transient failures gracefully.

The following error codes now emit Retry-After headers:

  • 1004 (DNS resolution error) - 120 seconds
  • 1005 (Banned zone) - 120 seconds
  • 1015 (Rate limited) - 30 seconds
  • 1033 (Argo Tunnel error) - 120 seconds
  • 1038 (HTTP headers limit exceeded) - 60 seconds
  • 1200 (Cache connection limit) - 60 seconds
  • 1205 (Too many redirects) - 5 seconds

How It Works

The Retry-After header value matches the existing retry_after field that was previously only available in JSON and Markdown response bodies. This eliminates the need for clients to parse response bodies to determine recommended wait times—the information is now available in the response headers alone, making implementation simpler and more efficient.

If a WAF rate limiting rule has already set a dynamic Retry-After value, that value takes precedence over the default values listed above.

Availability and Action Items

This feature is available immediately for all zones on all Cloudflare plans at no additional cost. Developers should update their HTTP clients and retry logic to check for and respect the Retry-After header when handling these errors. Existing implementations that parse the response body will continue to work without changes.