Somewhere in your config there's a 301 redirect (UHOH!) to localhost, either as a cloudflare page rule or a misconfiguration on your origin server. If you use chrome you can remove HSTS for your domain here: chrome://net-internals/#hsts , this should at least allow you to replicate the problem (just don't visit the https version or it'll be enabled again.)