- 1 Best Ways to Hide a WordPress Page from Google
- 2 How to Discourage Search Engines from Indexing this Site in WordPress (Easy Way)
- 3 Allow Search Engine Indexing in WordPress
- 4 Video Search engine visibility wordpress
Best Ways to Hide a WordPress Page from Google
Posted: August 03, 2022
Why hide a WordPress page from Google or other search engines? With 61% of marketers saying improving SEO and increasing organic presence are their top priorities, it seems counterintuitive to hide content from potential customers.
However, there are several reasons to hide content from search results. If you have an invite-only event, for example, you don’t want visitors to find the page with the RSVP link in a SERP. Or you may have pages with sales presentations or team communications that are for internal use only.
Whatever the reason, you have several options for hiding a WordPress page from Google. In this article, we’ll show you how.
Grow your business with HubSpot’s tools for WordPress websites
- How to Hide a WordPress Page from Google
- Using the Robots.txt file to hide WordPress pages from Google
Using Yoast SEO to Hide WordPress Pages from Google
Change WordPress Page Visibility
- Take control of your WordPress content
How to Hide a WordPress Page from Google
There are two options for hiding a WordPress page from Google. You can edit the robots.txt file in your hosting account’s control panel. However, since an error in this file can negatively affect your site’s SEO, this method is recommended for more advanced users. Newbie users who lack coding experience can use the Yoast SEO plugin to tell Google not to index certain pages on their site.
We’ll discuss each of these methods in detail below so you can choose the one that best suits your level of technical expertise.
Using the Robots.txt file to hide WordPress pages from Google
Pour cacher certaines pages à Google, vous pouvez éditer le fichier robots.txt dans le panneau de contrôle de votre compte d’hébergement. Robots.txt est un fichier situé dans le répertoire racine de votre site qui indique à Google et aux autres robots des moteurs de recherche les publications et les pages à explorer.
Pour y accéder, connectez-vous au cPanel de votre compte d’hébergement et cliquez sur l’icône Gestionnaire de fichiers dans la section Fichiers.
Police de caractère
Dans le menu de navigation sur le côté gauche de votre écran, cliquez sur le dossier public_html. Localisez le fichier robots.txt et cliquez sur Modifier dans le menu en haut de l’écran.
Police de caractère
Il s’ouvrira dans un éditeur de texte tel que le Bloc-notes sous Windows ou TextEdit sur Mac. Supprimez tout texte existant et copiez-collez le code suivant :
User-agent: * Disallow: /your-page/
Note that you will need to replace the placeholder text in the Disallow field with the URL path of the page you want to hide. The path is right after your domain name.
For example, suppose the URL of the page you want to hide is http://www.yoursite.com/2020/1/pricing-page/.
Then the code snippet you add to your robots.txt file will look like this:
User-agent: * Ban: /2020/1/pricing-page/
Vous pouvez laisser le champ User-agent tel quel, car l’astérisque signifie que tous les robots d’exploration Web seront invités à ne pas indexer cette page. Si vous souhaitez masquer cette page à Google uniquement, remplacez l’astérisque par “Googlebot” dans le champ user-agent. Cela permettra aux autres robots des moteurs de recherche d’indexer la page.
Une fois que vous avez apporté vos modifications à l’extrait de code, enregistrez et téléchargez le fichier robots.txt dans votre dossier public_html.
Google search crawlers will now follow the instructions in this file and not index this page.
While this method is relatively simple for users with some coding knowledge, it may not be for beginners. That’s because any incorrect information added to a robots.txt file will harm your site’s search engine visibility. For that reason, if you don’t have coding skills, you may be better off using a plugin.
Using Yoast SEO to Hide WordPress Pages From Google
If you’d like to avoid coding altogether, you can use the Yoast SEO plugin to hide pages from Google. To start, install and activate the plugin on your WordPress site.
Once it’s been successfully installed and activated, navigate to Pages > All Pages in your WordPress dashboard to edit the page you would like to hide from Google.
Scroll down to the Yoast SEO meta box below the post editor. Along the left side of this window, click on the gear icon to open the plugin’s advanced settings.
Here you can add meta tag robots to tell search engines like Google not to index or follow the page.
Just select Noindex from the drop-down menu under “Meta robots index.” Then click Nofollow under “Meta robots follow.”
You can now save or publish the post. Yoast SEO will add a line of code to the page that looks something like:
<meta name=”robots” content=”noindex,nofollow”/>
Search engines will now be instructed not to follow or index this page. If you’d like to hide this page from Google only, and not all search engines, then replace “robots” with “Googlebot.”
Changing the Visibility of WordPress Pages
While the above methods will prevent certain pages from appearing in Google search results, any visitors who have (or can guess) the link will still be able to view this content. If you’d like to hide this content from visitors, then you can set up a password to protect it.
There’s no need to install a plugin. WordPress comes with a built-in password protection feature for pages and posts. You just need to navigate to the page that you want to protect and go to the Publish meta box. Then click the link labeled “Edit” next to the Visibility option.
Select the “Password protected” option and fill in your password in the empty input box.
Once you click the Publish button, only users who know the password will be able to view the page.
Taking Control of Your WordPress Content
Using either of the methods above will enable you to hide a WordPress page from Google search results. Controlling which pages are visible in search and which are hidden will help ensure you put the right content in front of the right people.
Topics: WordPress Website
¡No olvides compartir esta publicación!
Aug 24, 2022
How to Discourage Search Engines from Indexing this Site in WordPress (Easy Way)
WordPress site owners will do anything to get their websites indexed. However, you might not want search engines to crawl through your website if it’s still in development. In a case like this, it’s recommended to discourage search engines from indexing your site. Stick with us if you want to learn more about this topic!
Download Ultimate WordPress Cheat Sheet
- Why Would You Want to Stop Search Engines From Indexing Your Site?
- 1. Discouraging Search Engines From Indexing WordPress Sites
- Using the WordPress Built-In Feature
- Editing robots.txt File Manually
- 2. Password Protecting Your WordPress Website
- Using Hosting Control Panel
- Using WordPress Plugins
- 3. Removing Indexed Page From Google
Why Would You Want to Stop Search Engines From Indexing Your Site?
There are some cases where people want to discourage search engines from indexing their sites:
- Unfinished websites — at this stage of errors and trials, it’s best not to have your website available to the public eyes. We recommend using a WordPress staging environment when performing tests on your site.
- Restricted websites — if you plan to have an invite-only website, you do not want it to get listed on SERPs.
- Test accounts — web owners create a site duplicate for testing and trial purposes. Since these sites are not designed for the public, don’t let it get indexed by search engines.
So how do you block search engines from indexing your site? Well, take a look at several options below and try it yourself.
1. Discouraging Search Engines From Indexing WordPress Sites
The simplest way to stop search engines from indexing your website is by preventing them from crawling it. To do it, you need to edit your WordPress website’s robots.txt file. Here are a few ways to achieve that:
Using the WordPress Built-In Feature
Editing WordPress robots.txt is quite easy as you only need to use a WordPress built-in feature. Here’s how:
- Login to the WordPress admin area and go to Settings -> Reading.
- Scroll down and locate the Search Engine Visibility option.
- Check the option that says Discourage search engines from indexing this site.
- Save Changes, and that’s it! WordPress will automatically edit its robots.txt file for you.
Editing robots.txt File Manually
If you prefer the manual option, you can use File Manager or an FTP client to edit the robots.txt file.
In this article, we’ll show you how to do it through the hPanel’s File Manager:
- Login to hPanel and locate File Manager under the Files area.
- Go to your WordPress root directory folder (in most cases, it’s public_html) and find the robots.txt file. If you can’t find it, create a new blank file.
- Right-click on the file and select Edit.
- Enter the following syntax: User-agent: * Disallow: /
The code above will prevent search engines from indexing your whole site. If you want to apply the disallow rule to a specific page, write the page’s subdirectory and slug. For example: Disallow /blog/food-review-2019.
The syntaxes in robots.txt files are case sensitive, so be careful when editing.
2. Password Protecting Your WordPress Website
Search engines and web crawlers don’t have access to password-protected files. Here are a few methods to password protect your WordPress site:
Using Hosting Control Panel
If you are a Hostinger client, you can password protect your website using hPanel’s Password Protect Directories tool:
- Access hPanel and navigate to Password Protect Directories.
- Enter your root directory into the first field.
- Once the directory is selected, enter your username and password and click Protect.
If your root directory is public_html, leave the directory column blank.
The process in cPanel is also quite similar:
- Log in to your cPanel account and head to Directory Privacy.
- Select your root directory. In our case, it’s public_html.
- Check the Password protect this directory option, and name the protected directory. Press Save.
- Create a new user to log in to the protected website, and that’s it!
Using WordPress Plugins
There are tons of plugins that can help password protect your site. However, the Password Protected plugin might just be the best one out there. It’s been tested with the new WordPress update, and it’s pretty straightforward to use.
After installing the plugin and activating it, head to Settings -> Password Protected and configure the settings to match your needs.
3. Removing Indexed Page From Google
Don’t worry if Google has indexed your site. You can remove it from the SERPs by following these steps:
- Configure Google Search Console for your website.
- Go to Google Search Console of your newly added website and scroll down to Legacy Tools & Reports -> Deletions.
- Click the Temporarily hide button and enter the URL you want to remove from Google.
- In a new window, choose Clear URL from cache and temporarily remove from search, then Submit request .
And that’s it! Google will temporarily remove your site from search results. Make sure to apply the above methods to prevent Google from re-indexing your site.
Here! Quick and easy ways to discourage search engines from indexing your sites. Here is a quick overview of the methods we learned today:
- Edit the robots.txt file , which can be done automatically or manually.
- Password protect your website using a plugin or your hosting control panel.
- Delete Google indexed pages via Google Search Console.
If you have other methods, or have any questions, let us know in the comments. Good luck!
Learn more about WordPress SEO
WordPress SEO Tips How to Create a WordPress Sitemap How to Add WordPress Schema Markup How to Add Meta Description and Meta Title in WordPress How to Set Up AMP (Accelerated Mobile Pages) in WordPress How to Add Breadcrumbs in WordPress
Was this tutorial helpful to you?
Domantas leads content and SEO teams with fresh ideas and fresh approaches. Armed with in-depth SEO and marketing knowledge, he aims to bring Hostinger to every corner of the world. In his spare time, Domantas enjoys honing his web development skills and traveling to exotic locations.
More Domantas G.
Allow Search Engine Indexing in WordPress
To help improve SEO rankings, follow these steps to ensure your WordPress site allows search engine indexing.
- Login to WordPress.
- Click Settings > Playback .
- Make sure Discourage search engines from indexing this site is not selected.
- Improve Google indexing.
- If you need help with search engine indexing, our WP Premium Support Catalog can do it for you.