The random parameter redirects always to the same post

You probably use a caching plugin or service that also caches query strings. Try adding an exception for the string “redirect_to=”.

You can also add the parameter &rutpdebug and see if you have any more matching posts at all.

Cloudflare

If you use Cloudflare, check if you cache query parameters (including Cache Level “Standard”) and try to disable this option, or add the following Page Rule:

If the URL matches: (replace example.com with your domain)

*example.com/*?*redirect_to=random*

Then the settings are:

Cache Level: No query string

How do you rate this article?