Skip to content

How to stop search engines from indexing your WordPress site?

Have you ever wondered how to hide your WordPress website from search engines? Maybe your website is under construction, or maybe you don't want your competitors to see what you're doing. Whatever your reason, there are a few simple methods that will enable you to hide your WordPress site from search engines.

1. Block search engines using WordPress settings

The easiest way to block search engines from accessing your site is to use WordPress' built-in feature. To do this, log in to your WordPress account and then go to “Settings” -> “Reading Room”. There you will find the “Discretion” option. Check the “Please do not index this page” box and save your changes.

2. Use the robots.txt file

Another method is to use the robots.txt file. This file gives you the ability to block specific sections of the page from being indexed by search engines. The robots.txt file should be placed in the main directory of your website (i.e. in the public_html directory). In WordPress, you can do this yourself or with a plugin like Yoast SEO. Below is an example code that blocks access to the entire page:

User-agent: * Disallow: /

3. Use the “noindex” meta tag

If you want to block only specific pages from being indexed, you can use the “noindex” meta tag. This can be done by adding the following code to the head section of the page:

<meta name="robots" content="noindex" />

4. Use a crawl blocking plugin

There are many WordPress plugins available on the market that allow you to block your website from being indexed by search engines. An example is the “Hide My Site” plugin. After installing it, the plugin will automatically add the “noindex” meta tag to every page on your website.

5. Block indexing with .htaccess

Another way is to use the .htaccess file. This file is available in the root directory of your WordPress site. You can add the following code to it to block indexing by search engines:

Header set X-Robots-Tag "noindex, nofollow"

All of these methods can help block search engines from accessing your WordPress site. Choose the one that suits you best and use it on your website. Remember, however, that blocking your page from being indexed by search engines should only be temporary. Long-term indexing blocking may negatively impact your website's visibility in search results, which may harm your online business.

Check out the offer of 1500+ Premium WordPress plugins and themes!