WordPress 7.2 turns on a /random/ redirect by default

WordPress 7.2 turns on a /random/ redirect by default

SEONovember 21, 2026
By Antonio Fernandez

TL;DR

  • Aaron Jorbin's 5 November 2026 dev note says WordPress 7.2 adds a /random/ URL that redirects to a random published post, enabled by default.
  • There is no dashboard toggle: the switch is the wp_enable_random_content_redirect filter returning false; the 13 November Developer Blog roundup misprints it as wp_enable_random_content_direct.
  • SEJ reports the redirect is a 302 with no-cache headers and X-Robots-Tag: noindex, follow on the /random/ response, and a page or post slugged random overrides it.
  • Code changes from 12 to 17 November adjusted firing, search handling and post selection; the Secrets API was removed from 7.2 on 17 November.
  • WordPress 7.2 is scheduled for 8 December 2026, and details may still change during the release candidate phase.

WordPress 7.2, scheduled for release on 8 December 2026, will add a /random/ URL to every site that sends visitors to a randomly chosen published post, and the feature is switched on by default. There is no dashboard setting to turn it off: site owners who do not want it have to add a filter in code. In the past week the release has kept moving. Code changes between 12 and 17 November adjusted how the redirect fires and selects posts, the separate Secrets API was pulled from 7.2 on 17 November, and a 19 November status report from Search Engine Journal said that, as of 17 November, no change to the /random/ default or URL had been posted. Details can still change before the final release.

Where WordPress 7.2 stands as of 19 November

Search Engine Journal's 19 November report by Matt G. Southern sets out the schedule. WordPress 7.2 is due on 8 December, although the WordPress.org roadmap still showed 10 December. Beta 5 was published on 10 November, and WordPress said it is intended for testing and development, not production sites. Release Candidate 1 followed on 17 November: WordPress.org's RC1 announcement repeats the 8 December date, warns against running it on production sites and lists improvements to the random-content redirect among its recent fixes. SEJ lists RC2 for 24 November and RC3 for 1 December, with a dry run and code freeze set for 7 December.

On the random redirect, SEJ reported that code changes between 12 and 17 November adjusted when the redirect fires, how it handles searches and how it selects posts. As of 17 November, no change to the on-by-default behaviour or to the URL structure had been posted. That is the state a site owner should plan around, while watching for late changes in the release candidates.

What the /random/ feature does

The feature is documented in a core developer note by Aaron Jorbin, "Your Content Is Going To Get More Random!", published on Make WordPress Core on 5 November 2026. It says a request to /random/ leads visitors to a randomly selected published post, that it is built on the existing rewrite, WP and WP_Query APIs, and that it is enabled by default.

The URLs it creates

With pretty permalinks and the default base, the dev note lists these rules:

  • /random/ goes to a random post.
  • /random/category/{slug}/ goes to a random post in that category.
  • Any publicly queryable taxonomy attached to an eligible post type gets a similar rule, such as /random/tag/{slug}/.
  • /random/author/{name}/ goes to a random post by that author.
  • /random/{post-type-slug}/ goes to a random post of an eligible custom post type.

The "random" base is translatable and can be changed on the Permalinks settings screen. SEJ adds that a ?random query variable also works on the home page and archives, and that since a 16 November change, search URLs carrying it redirect to the same search without the parameter.

Which content is eligible

The dev note introduces a new randomable argument for register_post_type(). If it is not set, it defaults to true for post types that are publicly queryable and have an archive. Among the built-in types, posts are randomable and pages and attachments are not. A plugin can set randomable to false to keep its post type out. SEJ notes that only published posts without a password are picked.

The response, as SEJ read the code

The dev note itself does not specify HTTP status codes or headers. SEJ's reading of the code fills that in, and these are the details an SEO team will care about most.

The response, as SEJ read the code
SituationBehaviour reported
Request to /random/ that finds a post302 redirect with no-cache headers; the redirect response carries X-Robots-Tag: noindex, follow, the destination post does not
No matching post404
A published page slugged "random", or a post with that slug on postname permalinksThe page or post overrides the redirect
Cached or CDN-backed site right after upgrading/random/ may return a 404 until rewrite rules are flushed on the first wp-admin visit; purging the page cache afterwards helps

Peter Wilson confirmed the slug collision, SEJ reported, and suggested a different base such as "shuffle" for sites affected. SEJ also flagged that random selection does not skip posts an SEO plugin has set to noindex, and that no response to that concern had been posted as of 16 November.

How to turn it off, and the misprinted filter

The dev note names the switch for the random content redirect: the wp_enable_random_content_redirect filter, returning false. When it is disabled, no random rewrite rules are generated, the random base field disappears from the Permalinks screen, and the random query variable is ignored. SEJ describes the practical route as a one-line must-use plugin, for example add_filter( 'wp_enable_random_content_redirect', '__return_false' );, followed by a rewrite flush.

The name matters because one official source prints it wrongly. The WordPress Developer Blog's "What's new for developers? (November 2026)" roundup, by Justin Tadlock and dated 13 November, says the feature can be disabled by filtering wp_enable_random_content_direct. That is not the name in the dev note, and SEJ reports it is not used in the code. A team that copies the roundup's line will add a filter that does nothing and leave /random/ live.

For developers who want to keep the feature but shape it, the dev note says selection runs through the main query, so existing pre_get_posts callbacks for an archive also apply to its random redirect. The function wp_is_random_content_query() lets code target random requests only, for example to exclude a category.

How the feature reached default-on

SEJ traced the history. Random redirects first appeared on 21 September as an optional ?random query that needed a filter to enable. They were reverted two days later. On 16 October they came back as default-on /random/ rewrite rules with a renamed filter, and shipped in Beta 1 on 20 October.

The default drew pushback. Joost de Valk called default-on "a horrible idea", SEJ reported, and worried that visitors could land on invoices and client-specific pages. Aaron Jorbin defended the opt-out approach. Matt Mullenweg said the URL should not use page URL structure and that the original request had been for a root-level /?random.

A 17 November performance fix (changeset 65542) also changed how posts are picked: it looks up random post IDs instead of sorting whole archives, with sparse archives falling back to a cached pool of up to 1,000 posts, reused for 10 minutes on sites with a persistent object cache.

Separately: the Secrets API was pulled on 17 November

The Secrets API, a core API for storing credentials such as API keys and OAuth client secrets in encrypted form, was described in an 11 November Make Core post by Eric Mann. A 17 November update at the top of that post says it "will no longer be shipping with WordPress" 7.2, linking changeset r65538. The comment thread shows the objections. Ryan McCue wrote on 12 November, "I am a strong -1 on this feature." Matt Mullenweg agreed with him on 13 November. Peter Wilson wrote on 16 November that the code lacked capability checks for setting secrets. Eric Mann said he would still like to target 7.3. For site owners, the practical point is simple: do not plan on a core credential store in 7.2.

What this means for Thai marketers

This section is analysis, not something the sources state. Any Thai business running its site on WordPress will get 7.2 when it, or its host, applies the update. The redirect is unlikely to hurt rankings directly, given the noindex header and 302 status SEJ describes, but it does create new crawlable URLs and some real edge cases. A short pre-update check is worth doing before 8 December.

  1. Decide whether you want it. A content-heavy blog may welcome a "surprise me" link. A business site with offers, client portals or one-off landing pages built as posts may not.
  2. If not, use the right filter. wp_enable_random_content_redirect, not the misprinted version from the Developer Blog. Flush permalinks afterwards and test that /random/ no longer redirects.
  3. Check for a "random" slug. Search for an existing page or post with that slug, since it will override the redirect.
  4. Check custom post types. Any publicly queryable type with an archive, such as products or case studies, is randomable unless the plugin sets it otherwise.
  5. Check the translated base. The base is translatable, so a Thai-language admin may produce a different path. Confirm what the Permalinks screen shows.
  6. Watch caches and crawls. Flush rewrites and purge caches after the upgrade, then look for /random/ requests in logs and crawl reports. A quick technical SEO audit after a major core update is a sensible habit.

Teams running SEO for Thai sites on WordPress should also note the open question of noindexed posts. If an SEO plugin hides thin pages from search, /random/ can still send visitors to them.

Frequently asked questions

When does WordPress 7.2 come out?

WordPress 7.2 is scheduled for 8 December 2026. SEJ noted that the WordPress.org roadmap still listed 10 December as of 19 November, and dates and details can still change during the release candidate phase.

Can I turn off /random/ in the dashboard?

No, there is no dashboard setting. You disable it in code with the wp_enable_random_content_redirect filter returning false, typically in a must-use plugin, then flush the rewrite rules.

Will /random/ pages get indexed by Google?

The redirect itself should not be indexed, according to SEJ's reading of the code. The /random/ response is a 302 with no-cache headers and an X-Robots-Tag: noindex, follow header, while the destination post keeps its own indexing settings.

Which filter name is correct?

wp_enable_random_content_redirect is correct. The November Developer Blog roundup prints wp_enable_random_content_direct, which does not match the dev note and, per SEJ, is not used in the code.

Is the Secrets API in WordPress 7.2?

No, it was removed from 7.2 on 17 November. The author of the dev note said he would like to target 7.3 instead.

Before you update

The /random/ redirect is a small feature with a few sharp edges: default-on, no toggle, a misprinted filter in one official roundup, and slug and cache quirks. Settle it before 8 December rather than after. If you would like help checking a WordPress site before the update, Relevant Audience can run through it with you.

Antonio Fernandez

Antonio Fernandez

Founder and CEO of Relevant Audience. With over 15 years of experience in digital marketing strategy, he leads teams across southeast Asia in delivering exceptional results for clients through performance-focused digital solutions.

Share to:
Copy link:

Read us often? Add Relevant Audience as a preferred source so our articles surface more in your Google results.