Must Use HTTPS
Production Risk
Medium — indicates a misconfigured client or application sending plain-HTTP requests; audit all outbound URLs.
528 Must Use HTTPS is returned by Cloudflare when a resource is only available over HTTPS but was requested over plain HTTP. The resource exists and is reachable — the request simply used the wrong scheme.
- 1Client sent an HTTP request to a resource that Cloudflare is configured to serve over HTTPS only.
- 2Cloudflare's 'Always Use HTTPS' or 'HTTP Strict Transport Security (HSTS)' setting is active on the zone.
- 3A hard-coded http:// URL in application code or a redirect loop missed the scheme upgrade.
A Cloudflare-proxied resource is requested over HTTP when the zone enforces HTTPS.
curl -v http://example.com/api/data # Response: HTTP/1.1 528
expected output
HTTP/1.1 528 Must Use HTTPS
Fix 1
Retry the request with HTTPS
WHEN When the client controls the URL and can switch schemes.
# Change http:// to https:// curl -v https://example.com/api/data
Why this works
528 indicates the resource exists and is reachable — only the scheme was wrong. Switching to https:// resolves the error immediately.
Fix 2
Enable Cloudflare 'Always Use HTTPS'
WHEN When configuring the Cloudflare zone to prevent HTTP requests reaching origin.
# In Cloudflare dashboard: # SSL/TLS → Edge Certificates → Always Use HTTPS → ON # This will 301-redirect HTTP requests to HTTPS before 528 is needed.
Why this works
With 'Always Use HTTPS' enabled Cloudflare issues a 301 redirect rather than a 528, which is friendlier for browser clients.
✕ Disable HTTPS enforcement to stop seeing 528
This removes transport security from your origin and exposes users to man-in-the-middle attacks.
Cloudflare-specific; not defined in any IETF RFC. The 5xx range 520–599 is used by Cloudflare for CDN and edge-layer error reporting.
Cloudflare Support — 5xx Errors
https://developers.cloudflare.com/ssl/edge-certificates/additional-options/always-use-https/ ↗Content generated with AI assistance and reviewed for accuracy. Found an error? hello@errcodes.dev