HTTP Status 200 instead of 301 (Wordpress)

Hi everyone,

I’ve recently tweaked my wordpress website in order to add a 301 redirect on some pages based on several criterias.

My problem is that pages still responds with a 200 status code and I can’t figure why.

I’ve disabled the cache (wordpress side) for those pages in order the clearly identify that the issue doesn’t come from there and when I add a random query string at the end of the URL, the redirect works like charm.

Basically, I think that the problem is related to Cloudflare, but if I’m right, I don’t know where and why.

Is somebody inspired by this?

Thanks a lot for your help!

Why?

Cloudflare does not change status codes and if it is Wordpress that is better clarified in a Wordpress related forum, as it would be off-topic here.

Does it not send a 200 when you pause Cloudflare?

Hello @sandro

I understand your point, but actually I’m exploring every leads.
The fact that the behavior is different with or without a query string typically makes me think that the problem is linked to the cache.
I’ve excluded the wordpress cache, so the only one that remains is Cloudflare.

The main question is

Also, what’s the URL?

I’ve just discovered the “development mode” and you were right, the problem is still there.
I’ve to dig elsewhere.

Thanks for your time @sandro

Development mode only disables the cache, so to properly rule out Cloudflare you might want to pause it altogether (that you resolve then straight to your server and skip Cloudflare), but as mentioned earlier, Cloudflare generally does not change the status code so this most likely really is coming straight from your server and will require debugging at that end.

Problem solved thanks to you. A conflict with a plugin was the cause of my problem.
Again, thanks a lot.

1 Like

Pleasure :slight_smile:

1 Like

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