How To Stop Google Indexing A WordPress Page

block website from google

Typically, you do want search engines to be able to find your web pages. You’ll want your website and its contents to be as visible as possible. However, there are times when you’ll need to keep a page out of Google’s and other search engines’ reach. 

You can use this to safeguard secret pages, limit access to paid material, or entice search engines to overlook pages you won’t need to maintain for an extended period, such as those created to advertise one-time events.

Why would you want to stop search engines from indexing your site?

In the following situations, people may desire to prevent search engines from indexing their websites:

  • Unfinished websites – It is preferable to keep your website hidden from the public during testing and problems.
  • Restricted websites – Websites that are exclusively accessible by invitation should not appear in search engine results pages (SERPs).
  • Test accounts – Website owners build a replica of their site for testing and evaluation. Do not allow search engines to index these sites because they are not intended for the general public. 

Using a robots.txt file

The simplest action would be to manually create and upload a simple robots.txt file instructing all search engines to avoid it and not index any of its content to the root directory of your website. The syntax of the text file will be as follows:

User-agent: *
Disallow: /

You can also prevent search engines from crawling your website by using a built-in function on your WordPress admin:

  1. Go to Settings and choose Reading to start.
  2. Select the Discourage search engines from indexing this site checkbox next to Search Engine Visibility. Select Save changes.

By doing this, the following syntax is immediately added to your website’s robots.txt file:

User-agent: *
Disallow: /
You. can use RankMath robotxs.txt file editor to make your changes

Additionally, it adds the line:

<meta name='robots' content='noindex,follow' />

This approach shields you from the majority of crawlers and robots used by search engines, but it isn’t completely secure. 

Using the WordPress built-in feature

Since WordPress already has a built-in feature for editing robots.txt, doing so is pretty simple. This is how:

  • Go to Settings -> Reading after logging in to the WordPress admin area.
  • Locate the Search Engine Visibility option by scrolling down.
  • Select the checkbox next to the statement “Prevent search engines from indexing this site.”
  • Save Changes; then you’re done! For you, WordPress will automatically make changes to its robots.txt file. 

Password protecting your WordPress website

Files that are password-protected are inaccessible to web crawlers and search engines. A few ways to password-protect your WordPress website are listed below:

Using the hosting control panel

The procedure in cPanel is also very comparable:

  • Go to Directory Privacy after signing in to your cPanel account.
  • Choose the root directory. It is public HTML in our situation.
  • Select the option to password-protect this directory, then give the protected directory a name. Click Save.
  • To access the secured website, you must only create a new user.

Using WordPress plugins

Numerous plugins are available to assist in password-protect your website. The Password Protect plugin, though, might be the best one available. It has been tested with the most recent WordPress version and is rather simple to use. 

Go to Parameters -> Password Protected after installing and activating the plugin to adjust the settings to your specifications. 

Removing an indexed page from Google

If Google has crawled your website, don’t worry. By taking the following actions, you can delete it from SERPs:

  • For your website, install Google Search Console.
  • Go to your newly added website’s Google Search Console and choose Removals under Legacy tools and reports.
  • Enter the URL you want to have removed from Google by clicking the Temporarily conceal button.
  • Select Clear URL from Cache and Temporarily Remove from Search in a new window, then click Submit Request.

Your website will momentarily disappear from Google’s search results. Apply the aforementioned strategies to stop Google from indexing your website once more. 

Pros and cons of hiding a page

Hiding a page from search engines has advantages and disadvantages, just like everything else. 


  • Analyze your website’s analytics to find out where visitors are coming from. To gain a comprehensive view of how your marketing strategies are doing, you might want to make search engine traffic out of your analytics.
  • Promote a particular website page. Search engines will give priority to your pages if you have numerous pages that are SEO-optimized and have identical content. Therefore, you would want all accessible visitors to be directed to a page you’ve established expressly to market a product. 
  • Cover up recent happenings. In general, pages made for events like webinars, conferences, or product debuts do not need to be indexed. These pages could continue to appear in search engine results for years after your event has ended if you don’t hide them.


  • Searches won’t turn up any hidden pages. This is clearly a drawback. If you hide your pages, search engines won’t index them, and users won’t be able to locate them through searches.
  • Your request for no index will not be honored by everyone. Most search engines will abide by your request to hide particular pages, but evil crawlers and bots won’t. A bot that disseminates malware or steals private data like email addresses, phone numbers, and other details are examples. 


Whatever your purpose, you can easily conceal your pages from search engines using the many methods we’ve covered. Whether you’re running a private blog or are still creating your WordPress website, perhaps you’re now in a good position to move things along.

It can be difficult to maintain control of your WordPress website. However, you’ll be on the correct route to producing an amazing digital experience if you have top-notch hosting, abundant resources, and the appropriate WordPress security solutions. 


jay kang

Jay Kang, entrepreneur and SEO expert, is the driving force behind innovative platforms like and His latest creation, ProductReview.Tools, provides affiliate marketers with a powerful WordPress plugin for crafting high-converting reviews. Committed to empowering marketers, Jay continues to make a positive impact in the digital marketing space.

© Copyright 2023. A Product by  SEO RANK SERP LLC | Privacy Policy | Terms and Conditions


2055 Limestone Rd STE 200-C Wilmington, DE 19808 United States