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=”.

 

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