Strange Redirect Issue

Here’s my issue.

My site is experiencing redirect issues.

For example:

This URL Deadpool Movie Review | Find Out Why People Are Love This Movie should resolve to that page.

However, that URL redirects to the website’s Homepage.

If I turn on Developer mode and bypass Cloudflare - the issue goes away, and the URL loads as expected.

This is happening on several pages, can anyone point me in the right direction to fix this?

It looks like a redirect caused by a captcha was cached by Cloudflare.

Do you have a “cache everything” page rule? Cache everything on top of APO may have unintended consequences. Please see: Page Rule integration with APO · Cloudflare Automatic Platform Optimization docs.

In any case, purge your Cloudflare cache and see if it works.

Thanks for the reply.
I’ve double-checked and don’t have a ‘cache everything’ page rule enabled.

Purging the cache does cure the problem, but then it starts happening again.

I have the same issue across a network of websites so it is not an isolated incident. For a multi-billion dollar company Cloudflare has many issues with very little in the way of support.

If I find a solution I will post it for you.

1 Like

If you are hosted at siteground the issue is probably as below:

There’s a problem that occurs when Cloudflare’s Automatic Platform Optimization is used along with with siteground Captcha protection mechanism.

When requests from an IP are detected as suspicious by the [Anti-Bot AI a Captcha challenge is visualised. The standard workflow is to solve the challenge and open the requested URL. The Cloudflare system ignores the cache-control: no-cache HTTP header and caches the Captcha page. Then the cached Captcha page is returned to the visitor with the corresponding IP and there is no option to solve it and proceed to the actual website’s page.

The Cloudflare developers are informed for the issue. It should be resolved on their end by implementing an exclude list where the corresponding path (/.well-known/) for the Captcha page can be added. Additionally, the Cloudflare system should honor the cache-control: no-store, max-age=0 headers that we already send for the Captcha page.

The workaround which we can offer from our end for users that want to use the Cloudflare APO is to temporarily deactivate the Captcha protection mechanism.

3 Likes

Thank you! We’ve been experiencing this exact same issue on and off the last 2 months (first detected in December 22).

I’d like to contribute what might help some.

I had a similar issue.

Every possible page on the site was redirecting automatically to the home page without any such rules being set on our end at the host or in Cloudflare.

Every possible visit was also triggering a captcha.

No changes to Cloudflare nor Siteground settings were made.

It came out of the blue.

Disabling cloudflare completely resolved both issues (no more captchas and no more redirects) but it was not resolving the underlying trigger, just a bandaid temporary solution and nothing else.

Enabling cloudflare and disabling bot attack mode and placing security under “essentially off” didn’t do anything either.

Disabling Cloudflare’s page rule → cache everything, stopped the redirects but didn’t stop the incessant captchas.

After troubleshooting with Siteground and Cloudflare for 8-10 hours, we finally realized what happened.

We use a VPN to test our site across the world.

Siteground’s firewall had automtically and unknowingly blocked a key IP related to the VPN, which ended up blocking all other IPs from that same VPN. I can’t explain how/why but that’s the story.

Once Siteground customer service unblocked this single IP, all captchas and all of the automatic redirects suddenly ceased across all IPs.

Everything was back in working order as if nothing happened.

We renabled all of Cloudflare’s original security settings (bot attack mode, stronger security level) and page rule (cache everything) and everything works just fine now.

Back to normal.

I can’t explain how/why everything interacted the way it did between Siteground and Cloudflare to cause these issues, but it obviously did somehow.

1 Like

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