WordPress 7.2, due on December 8, 2026, adds the /random/ URL: it redirects the visitor to a randomly selected published post, with variants by category, by author and by post type. The feature is on by default. It covers posts and any public custom post type with an archive, unless the developer excludes it with 'randomable' => false. In the development code, the redirect is a 302 sent with an X-Robots-Tag: noindex, follow header, and the destination post does not receive that header. For a small business, the check is the list of eligible post types before updating.
Contents
Aaron Jorbin published on the WordPress developers' blog, Make WordPress Core, the November 5, 2026 developer note that introduces the /random/ URL in WordPress 7.2.1 The release is scheduled for December 8, 2026.2 This article covers what the note says, what the development code shows and the checks to run on a small business site before updating.
01What the /random/ URL does
A request to example.com/random/ leads to a randomly selected published post.1 The feature is on by default and is built on WordPress's existing rewrite and query APIs.1
The URL variants
The random base is prefixed to the archive paths that already exist on the site. With pretty permalinks, the note lists these rules.1
| URL | Destination |
|---|---|
| /random/ | a random post |
| /random/category/<category>/ | a random post in that category; any publicly queryable taxonomy attached to an eligible post type gets a similar rule, for example /random/tag/<tag>/ |
| /random/author/<author>/ | a random post by that author |
| /random/<post-type>/ | a random post of an eligible custom post type |
The base is translatable and can be changed in a new field on the Settings, Permalinks screen.1
Eligible post types
A new randomable argument on register_post_type() controls eligibility. When it is not set, it defaults to true for post types that are publicly_queryable and have has_archive set.1 Among built-in types, posts are eligible; pages and attachments are not.1
In the development code, the selection adds two conditions: the post must be published and must not be password protected.3
What stays out of the draw
The code ignores the random variable for requests that are not for posts: robots.txt, the favicon, sitemaps, feeds and trackbacks.4 A search request that includes the variable is redirected to the search results without it.4
If no post matches, for example on an empty archive, the request is handled as a 404.3 A page published at the base URL, for example example.com/random/, takes precedence over the redirect.3
02The redirect as a search engine sees it
The HTTP response sent to the visitor, and so to crawlers, is in the wp_random_content_redirect() function of the WordPress development code.3
A 302 with a noindex, follow header
Once a post is drawn, the function sends the headers that prevent caching, adds the X-Robots-Tag: noindex, follow header, then redirects to the post's permalink with a 302 status code.3 The code comment states that these headers prevent the redirect from being cached or indexed.3
A 302 is a temporary redirect, and its effect on search results is covered in the redirect plan for a redesign.
The destination post keeps its own tags
The noindex, follow header goes only with the redirect response, and the request ends right after it.3 The destination post is then served at its usual URL, with the tags the site already gives it.
A noindex tag set by an SEO plugin is not one of the draw's conditions: eligible type, published post, no password.3 An eligible post marked noindex can therefore be drawn, and the visitor lands on it.
The debate among developers
Under the note, several developers ask for the feature to live in a plugin rather than in core, and one of them sees a security issue, since a site's content becomes easier to discover.1 Aaron Jorbin replies that most people want their content to be discovered, and points vulnerability reports to the dedicated process.1
03The checks before the December 8 update
On a small business site, custom post types (case studies, testimonials, job listings, product sheets) are often created by the theme or a plugin. If they are public and have an archive, they join /random/ by default.1
List the eligible post types
The first check is to note, for each post type on the site, the publicly_queryable and has_archive settings and, if present, randomable.1 This belongs in the audit of a WordPress site, next to the permalink structure.
After the update, repeated visits to /random/ and /random/<type>/ show what the site actually returns.
Three levels of exclusion
The developer note provides three settings, from the narrowest to the widest.1
| Scope | Setting described by WordPress |
|---|---|
| One post type | 'randomable' => false when registering the type with register_post_type() |
| Part of the content | a pre_get_posts callback that checks wp_is_random_content_query() and removes, for example, a category from the selection |
| The whole site | add_filter( 'wp_enable_random_content_redirect', '__return_false' ); in a mu-plugin: no random rewrite rules, the base field is hidden on the permalinks screen and the random query variable is ignored |
Existing pre_get_posts callbacks that customize an archive also apply to its random redirect, since the draw goes through the main query.1
The calendar
The official schedule sets Release Candidate 4 on December 1, a dry run with a 24-hour code freeze on December 7 and the release of WordPress 7.2 on December 8, 2026.2 The response described above is the one in the development code, before that release.
The URLs a site wants indexed are declared in a sitemap that lists the canonical versions, as detailed in the article on the XML sitemap.
