Всем советы и приветы!
Для того, чтобы изменить или дополнить, а лучше создать с нуля свой robots.txt для сайта WordPress, надо в файл под названием functions.php установить следующий PHP код:
/** Дополним базовый robots.txt
-------------------------------------------------------- **/
add_action( 'robots_txt', 'wp_kama_robots_txt', -1 );
function wp_kama_robots_txt( $output ){
$str = '
Disallow: /cgi-bin
Disallow: /?
Disallow: *?s=
Disallow: *&s=
Disallow: /search
Disallow: /author/
Disallow: */embed
Disallow: */xmlrpc.php
Disallow: *utm*=
Disallow: *openstat=
Disallow: *?attachment_id=
Disallow: /id_date
Disallow: *?stats_author
Disallow: *?all_comments
Disallow: *?post_type=func
Disallow: /filecode
Disallow: /profile
Disallow: /qtag/
Disallow: /articles/
Disallow: /artictag/
Disallow: /note-tag/
Allow: */uploads
Allow: */feed
Allow: */rss
';
$str = trim( $str );
$str = preg_replace( '/^[\t ]+(?!#)/mU', '', $str );
$output .= "$str\n";
return $output;
}
На этом у меня всё! Удачных решений!
А Вы оставите комментарий первым?