Turn off author archives
Author pages (/author/name/) redirect to the home page. On single-author sites they only repeat the blog and reveal the user name.
<?php
add_action(
'template_redirect',
static function () {
if ( is_author() ) {
wp_safe_redirect( home_url( '/' ), 301 );
exit;
}
}
);
// Leave them out of the sitemap and stop linking to them.
add_filter(
'wp_sitemaps_add_provider',
static fn( $provider, $name ) => 'users' === $name ? false : $provider,
10,
2
);
add_filter( 'author_link', static fn() => home_url( '/' ) );
In these packs
- SEO basics: Meta descriptions, social sharing tags, article structured data and cleaner indexing, for sites without an SEO plugin.
- Turn off more: More features you may not need: sitemaps, trackbacks, automatic updates, pattern suggestions.