WordPress SEO & privacy

Stop exposing usernames through a page nobody needed

Disable Author Archive blocks WordPress's automatic author archive pages and redirects visitors to a page or URL you choose, removing a thin duplicate-content page and the username it publishes in the same move.

  • Blocks both /author/username/ and ?author=N author archive URLs.
  • Redirect to a chosen page, a custom URL, or the homepage by default.
  • Author byline links site-wide point straight at the new destination.
  • Keeps author archive URLs out of the XML Sitemap module automatically.
Author Archive RedirectDisable Author Archive

Send visitors to

Page
Custom URL
https://google.it

If left unset, visitors are redirected to the homepage.

301 redirect, live immediately/author/username/ and ?author=N both blocked.
Active
Quick answer

What does Disable Author Archive do?

When the disable_author_archive module is active, TOWP_Disable_Author_Archive checks every request with WordPress's own is_author() conditional, which covers both the pretty-permalink /author/username/ form and the query-string ?author=N form, and issues a 301 redirect to a configured page, a custom URL, or the homepage if nothing's set. It also rewrites author byline links wherever a theme calls get_author_posts_url(), so links throughout the site point straight at the resolved destination instead of the blocked archive, and it tells the XML Sitemap module, if active, to leave author archive URLs out entirely.

The "free duplicate page with a username on it" problem

WordPress publishes an archive nobody asked for

Because every user gets an author archive automatically, most sites end up with pages that duplicate content and expose a username without anyone deciding either was worthwhile.

Duplicated content, listed again at another address

An author archive usually shows the same posts already reachable through category, tag or date archives, creating a page whose content is duplicated somewhere else on the site.

The URL itself is the author's login name

The archive's own address, /author/username/, hands the account's actual login username to anyone who bothers to look, which is exactly the value an attacker would want for a login attempt.

A dedicated WordPress solution

One redirect, two problems solved

The module sends visitors somewhere useful before either the duplicate content or the exposed username gets published anywhere.

Every author archive URL blocked

Both the pretty-permalink and query-string forms of the author archive get caught by the same check, with nothing left unblocked.

Redirect to whatever fits the site

Send visitors to a specific page, a custom URL, or leave it unset for an automatic redirect to the homepage.

Links fixed at the source, not just blocked

Author byline links generated by the theme point directly at the new destination, so visitors never even hit the redirect in the first place.

Verified feature set

Blocked, redirected, and corrected at the source

Every capability below is present in the supplied PHP class and its settings registration.

Flexible destination

Page, custom URL, or an automatic homepage fallback

Choose an existing published page, enter any URL, or, instead, leave it unset entirely and visitors land on the homepage by default.

Page or Custom URLHomepage fallback
External URLs actually work

The redirect host gets explicitly whitelisted

wp_safe_redirect() blocks any host but the site's own by default, so the module adds a configured external URL's host to the allowed list itself.

allowed_redirect_hostsNo silent redirect failure
Author links rewritten site-wide

Not just blocked, corrected at the source

The author_link filter makes get_author_posts_url() return the resolved destination directly, so theme-generated byline links never point at a blocked page to begin with.

author_link filterget_author_posts_url()
301, not a soft block

A permanent redirect search engines actually follow

The redirect uses a 301 status code, telling search engines the address has permanently moved rather than temporarily failing.

301 redirectSearch-engine correct
Sitemap integration

Author URLs excluded automatically

A dedicated filter tells the XML Sitemap module, if active, not to publish author archive URLs that this module redirects away from anyway.

towp_sitemap_include_authorsPrevents dead sitemap links
Practical use cases

Where blocking author archives helps most

The module supports any site where the author archive adds exposure or duplication without providing real value.

Sites where usernames shouldn't be public

Remove the one page that publishes a login username as its own URL, especially alongside a login restricted to username only.

Sites cleaning up duplicate content

Eliminate a page whose content already exists elsewhere, without needing to touch the posts or categories that create the duplication.

Single-author or small-team sites with no real use for author pages

Instead of leaving a page nobody actually browses, redirect it to somewhere more useful, like the homepage or a relevant landing page.

Operational benefits

Less exposure, less duplication, better links

The module combines a real privacy improvement with a genuine SEO cleanup.

One less place a username gets publishedThe archive's own address, which is the login username, stops being reachable at all.
Less duplicate content for search engines to sort throughA thin, duplicated archive page no longer competes with the actual posts it was repeating.
A redirect that goes somewhere usefulInstead of a 404 or a page with nothing of its own to offer, visitors land on a real destination chosen deliberately.
Byline links that work correctly from the first clickSince links get rewritten at the source, visitors clicking an author's name never experience an unnecessary redirect at all.
Performance behaviour

One check, early in the request

The verified implementation avoids rendering a page that would just be redirected away.

One conditional check per request

is_author() is a lightweight WordPress conditional; the check adds negligible overhead to every page load.

The redirect happens early, at template_redirect

Blocking happens before WordPress finishes building the page that would otherwise be discarded, avoiding unnecessary rendering work.

Link rewriting reuses an existing filter

Correcting author links uses WordPress's own author_link filter, adding no separate processing step beyond what themes already call.

Security implementation

Fewer usernames exposed, redirects validated carefully

The code closes off a real enumeration path and handles external destinations correctly rather than loosely.

01

Removes a username-enumeration page

Since the author archive's URL is the login username, blocking it removes one of the simplest ways to collect valid usernames for a login attempt.

02

Redirect destinations are validated

Before it's used, a configured page must actually exist, be a page, and be published; otherwise, anything else falls back to the homepage automatically.

03

External redirects are explicitly whitelisted, not blanket-allowed

Only the specific host of a configured Custom URL gets added to the allowed redirect list, not redirects to arbitrary hosts in general.

04

Configuration requires the same access as any other setting

Choosing the redirect destination happens through the standard TheOneWP settings screen, available only to an administrator.

Verified compatibility

Built directly around WordPress's own author and redirect systems

The supplied code integrates through APIs present in WordPress core and TheOneWP's own modules; this page makes no compatibility claim beyond the verified implementation.

Author detection

is_author()

The native WordPress conditional used to detect any author archive request, in either permalink format.

is_authorNative conditional
Safe redirect handling

wp_safe_redirect() and allowed_redirect_hosts

The core function and filter WordPress uses to redirect safely while still permitting an explicitly whitelisted external destination.

wp_safe_redirectallowed_redirect_hosts
XML Sitemap integration

towp_sitemap_include_authors filter

A dedicated filter that keeps TheOneWP's own XML Sitemap module from publishing author archive URLs this module redirects away from.

towp_sitemap_include_authorsSitemap-aware
Solution comparison

TheOneWP versus common alternatives

Compare the verified Disable Author Archive implementation with a typical hand-written redirect snippet.

CapabilityTheOneWP Disable Author ArchiveOther common solutions
Blocking both URL formats /author/username/ and ?author=N both covered by the same checkSome snippets only catch the pretty-permalink form
Redirect destination Page, custom URL, or automatic homepage fallbackOften hardcoded to a single fixed destination
External redirect targets Explicitly whitelisted so they actually workwp_safe_redirect can silently fail without this handling
Author byline links Rewritten site-wide at the sourceUsually still point at the now-blocked archive URL
Sitemap coordination Author URLs excluded automatically when the module is activeCan leave dead author-archive links in a generated sitemap
Recommended workflow

Block the archive in four steps

Confirm the redirect actually lands where expected before considering it done.

01

Enable Disable Author Archive

Activate the module from the TheOneWP Components settings tab.

02

Choose a Page or a Custom URL

Select an existing page from the site, or enter any URL as the redirect destination.

03

Leave it unset if the homepage is the right fallback

Skip configuration entirely to send visitors to the homepage by default.

04

Visit an author archive URL to confirm

Check that /author/username/ now redirects correctly to the configured destination.

Best practices

Send visitors somewhere they'll actually want to be

A thoughtful destination makes the redirect feel intentional rather than like a dead end.

01

Redirect to something genuinely relevant

A category page, a team or about page, or the homepage all make better destinations than an arbitrary unrelated URL.

02

Confirm an external Custom URL actually redirects

Since external hosts need explicit whitelisting to work with wp_safe_redirect(), it's worth checking the redirect actually lands where expected.

03

Pair this with Hide Author Slug for full coverage

Blocking the archive removes the page; hiding the slug elsewhere removes remaining places the username might still surface.

04

Recheck after changing the destination

A quick visit to an author URL after updating the setting confirms the new destination is actually in effect.

Common mistakes

Avoid gaps the redirect alone doesn't close

A couple of details are easy to overlook when relying on this module as the only fix.

Assuming an unpublished or deleted page still works as a destination

A configured page must be published and still exist; otherwise the module falls back to the homepage automatically.

Expecting an external redirect to work without checking it

An external Custom URL needs its host allowed for wp_safe_redirect() to actually reach it, which this module handles, but it's still worth confirming.

Forgetting the username is still visible elsewhere

Blocking the archive removes one exposure point; a username can still appear in other places like the login error message or a REST API response.

Frequently asked questions

Disable Author Archive FAQ

These answers come directly from the verified class and its settings registration.

What does Disable Author Archive do?

It blocks WordPress's author archive pages, at both /author/username/ and ?author=N, and redirects visitors to a configured page, a custom URL, or the homepage by default.

Does this block both permalink formats for author archives?

Yes. WordPress's own is_author() conditional catches both the pretty-permalink and query-string forms identically.

What happens if I don't configure a destination?

Visitors get redirected to the homepage automatically.

Can I redirect to an external website?

Yes. A Custom URL can point anywhere, and the module whitelists that specific host so the redirect actually works.

What happens if the page I configured gets deleted or unpublished?

The module falls back to the homepage automatically, rather than redirecting to a broken destination.

Does this fix author links elsewhere on the site, or just block the archive page?

Both. Author byline links generated by the theme get rewritten to point at the resolved destination directly.

Does this affect the XML Sitemap module?

Yes, if it's active. Author archive URLs get excluded from the generated sitemap automatically.

Is this a permanent or a temporary redirect?

Permanent. The module uses a 301 redirect, the correct signal for search engines.

Does this remove the username from everywhere on the site?

No. It removes the author archive specifically; a username can still appear elsewhere, such as in login error messages.

Who can configure the redirect destination?

Only an administrator with access to the TheOneWP settings screen.

Stop publishing a duplicate page with a username as its address.Redirect it somewhere that actually helps visitors.

Use Disable Author Archive to block /author/ pages and send visitors to a page, a custom URL, or the homepage, with author links corrected site-wide.