When it comes to search engine optimization (SEO), one of the fundamental aspects to consider is the control over the indexing of a
website ‘s pages . There are times when it may be necessary to hide certain pages from search engines, such as login pages, restricted pages, or sections under development. This is possible thanks to the robots meta tags , in particular the noindex and nofollow tags.
In this specific case, the client’s website, which recently requested my SEO services , was unable to be indexed in Google. After a quick check of the code and a further check in Google Search Console, we found that the robots meta tag within the pages showed this code:
<meta name='robots' content='noindex,nofollow' />
Of course, Google did not index the pages accordingly.
In this article, we will see how to add or remove noindex tags in WordPress , using different solutions. We will also discuss the nofollow tag and how both tags can affect the indexing of your site’s pages .
The WordPress robots noindex tag is an attribute that is inserted into the HTML code of a page and is used to prevent a page of the site from being indexed by search engines.
What is this tag used for? It is often used for:
There are several methods to add noindex tags in WordPress . Here are two of the most common:
In your WordPress admin panel, click on “ Settings ” then “ Reading ” and scroll down to “Search Engine Visibility”. Click on “Discourage search engines from indexing this site”.
In the code, the robots meta tag will be changed to “noindex,nofollow”.
Conversely, uncheck the checkbox to remove “noindex”.
Yoast SEO is one of the most used plugins for managing SEO on WordPress. One of its main features is the ability to manage robots meta tags , including noindex and nofollow .
With this method, your site page will be excluded based on the WordPress noindex tag and will not appear in search results.
If you prefer to edit the HTML code directly , you can manually insert the meta name tag robots content noindex nofollow WordPress in the head section of the page .
Access your WordPress theme : Go to Appearance > Theme Editor.
Editing the header.php file : Find and edit the header.php file. This file contains the head section of the page .
Adding the meta tag : Insert the following code inside the <head> tag of the page you want to exclude from indexing:
<meta name="robots" content="noindex, nofollow">
This will prevent both the indexing of the page and the following of links on it.
This method is more technical, but gives you full control over where and how to place your robots meta tags .
If a page has previously been excluded based on the WordPress noindex tag , you may want to remove this tag in the future to index the page . Again, Yoast SEO and manually editing the source code are two valid options.
Now the page will be indexed by search engines and may appear in the results.
If you manually inserted the noindex tag , you need to remove it from the page’s HTML code . Go back to the header.php file or the page template and delete the line containing the tag:
<meta name="robots" content="noindex, nofollow">
Alternatively, you can change it to:
<meta name="robots" content="index, follow">
This will allow search engines to index your pages and follow internal and external links.
The nofollow tag is used to tell search engines not to follow links on a page or to pass authority from an internal or external link to other pages on other websites.
If you have used the nofollow tag for a specific link and want to remove it, there are two ways:
Similar to what we saw for the noindex tag , you can use Yoast SEO to manage the nofollow rel attribute .
To remove the nofollow tag manually, you need to access the HTML code of the page and find the link that contains the attribute:
<a href="URL" rel="nofollow">Link Anchor Text</a>
Remove the rel=”nofollow” attribute , leaving the link intact:
<a href="URL">Link Anchor Text</a>
This will allow search engines to follow the link and pass SEO value to the linked site.
A common mistake is to confuse the two tags. Noindex is used to prevent search engines from indexing your pages , while nofollow is applied to links and tells search engines not to follow them. You can use these tags together or separately, depending on your needs.
For example, a typical meta name robots content noindex follow indicates that the page will not be indexed, but the links on it will be followed by search engines.
In addition to the robots meta tags , you can control the indexing of your pages using the robots.txt file , which tells search engines which sections of your website should not be crawled.
For example, if you want to exclude a certain page from all search engines, you can use this code in your robots.txt:
User-agent: *
Disallow: /page-to-exclude/
However, the robots.txt file does not always guarantee that a page will be excluded from search results; for this reason, it is often recommended to combine the use of meta name robots content noindex nofollow with the robots.txt file .
For more tips read How to stop Google from indexing a web page?
What is the noindex tag? The noindex tag tells search engines not to index a page.
When should I use the noindex tag? Use it for restricted pages, duplicate content, or temporary pages.
How can I add the noindex tag in WordPress? You can use a plugin like Yoast SEO or manually add the tag in your HTML code.
What does the nofollow tag do? It prevents search engines from following links on a page.
How can I remove a noindex tag from a WordPress page? Through the Yoast SEO plugin or by editing the HTML code of the page.
Does the noindex tag also block the page from being crawled? No, the page can be crawled but will not be indexed.
Can I use noindex and nofollow together? Yes, to prevent both indexing and following of links.
Can robots.txt replace the noindex tag? Not completely. Robots.txt can block crawling, but not always indexing.
Can I remove the nofollow tag from a WordPress link? Yes, either through Yoast SEO or manually from the HTML code.
How do I check if a page has the noindex tag? Check the source code or use tools like Google Search Console.
We will send you periodical important communications and news about the digital world. You can unsubscribe at any time by clicking the appropriate link at the bottom of the newsletter.
Instagram introduces the option for creators to enable replies in broadcast channels, boosting engagement with…
A step towards more effective advertising campaigns thanks to the integration of first-party data. Customer…
What is a web banner and why is it important? A web banner is a…
What is Web Design What is Web Design? It is the art of combining creativity,…
What are the elements of design The fundamental elements of design (I call them "design…
Why has Google hidden the results count? Google has recently chosen to make the results…