Cloudflare status code 301 redirect error

http://www. > 301 > https://
http:// > 301 > https://

I want to redirect as status code 301 in this way. I made definitions with page rule via Cloudflare. Right now;

http://www.ckhealthturkey.com/ > 301 > https://ckhealthturkey.com/
https://www.ckhealthturkey.com/ > 301 > https://ckhealthturkey.com/

these 2 are successfully redirected. But when entering the http://ckhealthturkey.com/ url, it redirects as status code 302. I think page rules is targeting this url.

Page rule and DNS A records are like this. I am a beginner in Cloudflare. I wonder where I am doing wrong.


The apex domain is not proxied…
https://cf.sjr.org.uk/tools/check?8ee92548bf074b3aa3db28da079405d4#dns
… so requests are going to Google and not through Cloudflare. The 302 redirect is therefore on Google…

curl -I http://ckhealthturkey.com/
HTTP/1.1 302 Found
Location: https://ckhealthturkey.com/
X-Cloud-Trace-Context: 4c3c8092b66a21eca4aeb823ab2bb513
Date: Wed, 03 Apr 2024 19:35:35 GMT
Content-Type: text/html
Server: Google Frontend
1 Like

Thanks a lot :slight_smile:

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.