The random parameter redirects always to the same post

You probably use a caching plugin or a service that also caches query strings. Deactivate all other plugins and disable caching for services like Cloudflare and try again.

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

If you can identify caching as the cause, try adding an exception for the URL string “redirect_to=”.

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