문제

I'm will be hosting a wordpress site on a live server. But it will be in test phase for while. How can I tell the robots not to index the site till then?

도움이 되었습니까?

해결책

Stick a "disallow everything" robots.txt file in (with a relatively short expires header) and edit it when you are ready for indexing.

다른 팁

Use robots.txt to disallow, then allow whenever your site goes live.

If you are using WordPress 3.x, you can go on the admin page to the Settings menu, then click Privacy. There is an option there to block robots.

Disable your RSS feed, too, as Google uses RSS for indexing. Use WordPress › Absolute Privacy « WordPress Plugins or use in functions.php:

function fb_disable_feed() {
    wp_die( __() );
}

add_action('do_feed', 'fb_disable_feed', 1);
add_action('do_feed_rdf', 'fb_disable_feed', 1);
add_action('do_feed_rss', 'fb_disable_feed', 1);
add_action('do_feed_rss2', 'fb_disable_feed', 1);
add_action('do_feed_atom', 'fb_disable_feed', 1);
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top