How To Disable Archive Pages In WordPress

Aside from being bad for SEO (due to duplicate content), most websites don’t need content alternately organized by month, author, category and tag.

///////////
// Disable All Archives To Remove Duplicate/Improve SEO
// Send any requests back to home page
///////////
function redirect_archives( $query ){
if( is_category() || is_tag() || is_date() || is_author() ) {
wp_redirect( home_url() );
exit;
}
}
add_action( 'parse_query', 'redirect_archives' );