There are many cases when you may want to hide full WordPress website from search engines. For example: while developing website online, you surely do not want “under construction” site getting indexed by search engines like Google, Yahoo, Bing. Also, you may have setup new test WordPress install in sub folder for experiments and would like that part to be invisible to search engines.

1. Use ‘Site Visibility’ Privacy Settings in WordPress

In your WordPress Dashboard, goto Settings > Privacy to open Privacy Settings page. Here click to checkAsk search engines not to index this site” option and then click “Save Changes”.

You can revert this setting, when you do not want to hide website from Search engines. While this is an easy method, it is not fool proof, as “it is up to search engines to honor your request“. While this will prevent search engine access, you can still directly open your “test” website and continue working on it.

2. Use “robots.txt” method for blocking search engines

You can control search engine access using custom code in “robots.txt” file. In your website’s root (like: there is robots.txt file, add following code to it.

User-agent: *
Disallow: /

Don’t have robots.txt file? You can simple create new text file with robots name, add above code and then ftp transfer it to website’s root accessible at url. Your WordPress website won’t be indexed by search engines till you have this code in robots.txt file, make sure to remove it when you want to allow search engines index website’s contents.

Davinder Singh Kainth

A digital creator with 15+ years of experience in Website Design, Development, SEO, and Content Creation to Podcasting at with the motto of "Be Smart, Keep Creating". A coach, consultant, and your dear geek friend ❖

Leave a Comment