UPDATE: In Cloudflare - Despite being in DEV mode, I turned OFF redirect to HTTPS: and this got past the infinite loop. However, if you use the 301 Redirect checker, you can see it is going from to to which is very odd - how to prevent the 301 to http?
I think this is a new issue - I have not made any obvious changes lately:
The canonical URL I want is
- If I go to it redirects to correctly
- If I go to it works correctly
- If I go to it gets into an infinite loop
- If I go to it gets into an infinite loop
According to .php and enter it seems to alternate between http and https until it eventually timesout.
Possible suspects:
- WP Redirection module (currently disabled)
- Cloudflare (Switched to Dev Mode)
- WP Rocket (currently disabled)
- RankMath (currently disabled)
- Kinsta Host - turned off Redirect setting to HTTPs
Any suggestions appreciated please.
>>>
> --------------------------------------------
> 301 Moved Permanently
> --------------------------------------------
Status: 301 Moved Permanently
Code: 301
Date: Thu, 26 Mar 2020 00:19:51 GMT
Content-Type: text/html
Connection: close
Set-Cookie: __cfduid=d86e44ea081ac34eddfeca3495d0879e21585181991; expires=Sat, 25-Apr-20 00:19:51 GMT; path=/; domain=.pokerdiy; HttpOnly; SameSite=Lax; Secure
Location: /
CF-Ray: 579cb3d68917e5f8-LHR
Strict-Transport-Security: max-age=2592000; includeSubDomains; preload
CF-Cache-Status: DYNAMIC
Expect-CT: max-age=604800, report-uri=""
RJCF: MISS
x-cfw-cache: MISS
X-Content-Type-Options: nosniff
Server: cloudflare
alt-svc: h3-27=":443"; ma=86400, h3-25=":443"; ma=86400, h3-24=":443"; ma=86400, h3-23=":443"; ma=86400
>>> /
> --------------------------------------------
> 301 Moved Permanently
> --------------------------------------------
Status: 301 Moved Permanently
Code: 301
Date: Thu, 26 Mar 2020 00:19:51 GMT
Connection: close
Cache-Control: max-age=3600
Expires: Thu, 26 Mar 2020 01:19:51 GMT
Location: /
X-Content-Type-Options: nosniff
Server: cloudflare
CF-RAY: 579cb3d7b863e630-LHR
alt-svc: h3-27=":443"; ma=86400, h3-25=":443"; ma=86400, h3-24=":443"; ma=86400, h3-23=":443"; ma=86400
UPDATE: In Cloudflare - Despite being in DEV mode, I turned OFF redirect to HTTPS: and this got past the infinite loop. However, if you use the 301 Redirect checker, you can see it is going from https://www.pokerdiy to http://www.pokerdiy to https://pokerdiy which is very odd - how to prevent the 301 to http?
I think this is a new issue - I have not made any obvious changes lately:
The canonical URL I want is https://pokerdiy
- If I go to http://pokerdiy it redirects to https://pokerdiy correctly
- If I go to https://pokerdiy it works correctly
- If I go to http://www.pokerdiy it gets into an infinite loop
- If I go to https://www.pokerdiy it gets into an infinite loop
According to http://www.redirect-checker/index.php and enter https://www.pokerdiy it seems to alternate between http and https until it eventually timesout.
Possible suspects:
- WP Redirection module (currently disabled)
- Cloudflare (Switched to Dev Mode)
- WP Rocket (currently disabled)
- RankMath (currently disabled)
- Kinsta Host - turned off Redirect setting to HTTPs
Any suggestions appreciated please.
>>> https://www.pokerdiy
> --------------------------------------------
> 301 Moved Permanently
> --------------------------------------------
Status: 301 Moved Permanently
Code: 301
Date: Thu, 26 Mar 2020 00:19:51 GMT
Content-Type: text/html
Connection: close
Set-Cookie: __cfduid=d86e44ea081ac34eddfeca3495d0879e21585181991; expires=Sat, 25-Apr-20 00:19:51 GMT; path=/; domain=.pokerdiy; HttpOnly; SameSite=Lax; Secure
Location: http://www.pokerdiy/
CF-Ray: 579cb3d68917e5f8-LHR
Strict-Transport-Security: max-age=2592000; includeSubDomains; preload
CF-Cache-Status: DYNAMIC
Expect-CT: max-age=604800, report-uri="https://report-uri.cloudflare/cdn-cgi/beacon/expect-ct"
RJCF: MISS
x-cfw-cache: MISS
X-Content-Type-Options: nosniff
Server: cloudflare
alt-svc: h3-27=":443"; ma=86400, h3-25=":443"; ma=86400, h3-24=":443"; ma=86400, h3-23=":443"; ma=86400
>>> http://www.pokerdiy/
> --------------------------------------------
> 301 Moved Permanently
> --------------------------------------------
Status: 301 Moved Permanently
Code: 301
Date: Thu, 26 Mar 2020 00:19:51 GMT
Connection: close
Cache-Control: max-age=3600
Expires: Thu, 26 Mar 2020 01:19:51 GMT
Location: https://www.pokerdiy/
X-Content-Type-Options: nosniff
Server: cloudflare
CF-RAY: 579cb3d7b863e630-LHR
alt-svc: h3-27=":443"; ma=86400, h3-25=":443"; ma=86400, h3-24=":443"; ma=86400, h3-23=":443"; ma=86400
Share
Improve this question
edited Mar 26, 2020 at 1:15
Rodney
asked Mar 26, 2020 at 1:09
RodneyRodney
1337 bronze badges
6
- Turn off all the plugins turn them on one by one – BenB Commented Mar 26, 2020 at 1:13
- Thanks, I have done this. No joy. I don't think it is at plugin level – Rodney Commented Mar 26, 2020 at 1:13
- What is the site URL in wp_options domain or domain? – BenB Commented Mar 26, 2020 at 1:16
- pokerdiy (with https:// and no wwww) – Rodney Commented Mar 26, 2020 at 1:18
- Where does the a record of domain redirect to, www or https:// without www? – BenB Commented Mar 26, 2020 at 1:23
1 Answer
Reset to default 0thanks to all those who tried to help. I was able to rule out many options by disabling all plugins, cloudflare etc. but the problem persisted.
The root cause turned out to be my own configuration on my host (Kinsta) when adding the SSL cert from LetsEncrypt.
I had bound the certificate to https://pokerdiy and not also to http://www.pokerdiy.
As soon as I bound it to both then the redirect error disappears.
Thanks to Kinsta's great tech support for helping me find the root cause, I don't think I would have spotted it otherwise...