Industry Snippet

WordPress 7.2 Adds a /random/ Redirect, Switched On by Default

Markdown
View as Markdown Open this page as plain text
This page as Markdown, ready to paste into ChatGPT, Claude or a doc.
RSS
Flat cartoon illustration of a round blue character in a charcoal newsboy cap and yellow bow tie, hosting a game show under a purple sign reading /RANDOM/. It winces with one hand on a six-segment prize wheel whose pointer has stopped on a red segment reading XMAS 2012. The other segments read HELLO WORLD!, NOINDEX, NEW OFFICE!, TOP 10 TIPS and BEST POST.
WordPress 7.2's /random/ redirect gives every eligible post the same odds, forgotten and noindexed ones included. Illustration: AI-generated.

WordPress 7.2, scheduled for 8 December 2026, adds a public /random/ address that redirects to a randomly selected published post. It is on by default, and there is no switch for it in the dashboard. Variants work inside archives (/random/category/news/ picks from that category), and the ?random query variable does the same on the home page and archives.

Which posts can /random/ land on?

ContentCan plain /random/ land on it?
Published post, no passwordYes, and every eligible post is equally likely
Noindexed post (published, no password)Yes
Password-protected postNo
Page or attachmentNot by default
Post filtered out of the main blog queryNormally no
Custom post typeOnly if a theme or plugin adds it to the main blog query

A post from 2012, many pages deep in the blog listing, has the same odds as this week’s. By default, a custom post type that is publicly queryable and has an archive can also be reached through its own path, such as /random/books/.

Most eligible posts are already linked from the site’s blog hub, and the redirect uses the same query as the archive it draws from. The exception is a hub built as a separate page with its own list of posts, or a site with no hub: posts missing from that list can still come up.

WordPress does not check for noindex, and neither do the current WordPress.org versions of Yoast SEO, Rank Math, All in One SEO, SEOPress and The SEO Framework (code read on 23 November). The post keeps its noindex, and the 302 redirect carries its own X-Robots-Tag: noindex, follow.

What to check before updating to WordPress 7.2

  • Review your older posts. Before the update is a good time to decide which need a content refresh and which to remove. Noindexing is one of the usual content pruning options, but it does not take a post out of /random/. Deleting or unpublishing it does; a redirect on a post left published only adds a second hop.
  • Turn the feature off if you do not want it. Use a must-use plugin containing the filter below, then flush the rewrite rules (saving the Permalinks screen does this). Copy the filter name from here or the developer note: Search Engine Journal spotted that WordPress’s November developer roundup misspells it, and it still did on 24 November.
    <?php
    add_filter( 'wp_enable_random_content_redirect', '__return_false' );
  • Check for content your hub leaves out. That includes custom post types, which can be missing from the XML sitemap and still have a public archive. A developer can opt a type out with 'randomable' => false, or change the selection with wp_is_random_content_query() as the developer note shows.
  • Look for an existing /random/ URL. A published page with the slug random takes precedence. To keep the page and the redirect, change the base in the new Random base field under Settings > Permalinks, which renames /random/ but does not turn it off. If a plugin or redirect rule handles the URL, test it on a staging copy of 7.2.

The details could still change. Matt Mullenweg, the 7.2 release lead, commented under the developer note on 7 November that “it should not use page URL structure”. The redirect is still on by default in the third release candidate, released on 24 November.

Sources

More news