Better Random Redirect
Based on the original Random Redirect, this plugin enables efficient, easy random redirection to a post. Supports setting a category for all random redirects, shortcodes to generate URLs that can override the default category, and setting your own redirector URL. Designed to scale to handle high-tra
Based on the original Random Redirect, this plugin enables efficient, easy random redirection to a post. Supports setting a category for all random redirects, shortcodes to generate URLs that can override the default category, and setting your own redirector URL. Designed to scale to handle high-traffic websites with thousands of posts by using a more efficient strategy than most other redirection plugins employ.
Based on the original Random Redirect by Matt Mullenweg https://wordpress.org/plugins/random-redirect/
Special thanks to Tim Green for providing additional quality assurance testing on the popular rattle.com website.
A closer look.
Install as normal for WordPress plugins.
Frequently asked questions.
Another random post redirection script, really?
Yep, really. So many of the ones currently out there are not suitable for large websites with lots of traffic.
This is because many random redirect plugins rely on the 'orderby' => 'rand' constraint in WordPress, or directly use 'ORDER BY RAND()' in their MySQL queries. This results in notoriously poor performance and can really cause problems with your MySQL server if this operation is heavily repeated on a website with lots of eligible posts.
This plugin uses a more efficient approach, including transient caching of all eligible posts by category and their post counts to minimise the time it takes to pick a true random post.
How do I set the URL?
Go to Settings > Better Random Redirect and change the URL slug from the default of “random” to whatever you want it to be.
How do I make the randomiser use just one category for everything?
Select the category you want to use in Settings > Better Random Redirect. This will become the default category used for all subsequent random requests. It can be overridden, however using the cat= shortcode attribute or query string as described below.