if you have a WordPress site and have search engines finding <yoursite>/author/admin or <yoursite>/author/a<name of author> and you don’t want this without adding another plugin (like Yoast SEO) then the following steps will redirect this page to your homepage
In WordPress admin console, navigate to Appearance > Theme File Editor. Once there, select functions.php from the right hand side.
Using the editor, add the following as a new line at the end of the file –
function my_custom_disable_author_page() {
global $wp_query;
if ( is_author() ) {
// Redirect to homepage, set status to 301 permenant redirect.
// Function defaults to 302 temporary redirect.
wp_redirect(get_option('home'), 301);
exit;
}
}
Save the file and now your site wont publish such pages.