By using the methods I shared in “How to Check if Your Website has been Indexed”, you may notice some posts or pages that you do not want to be indexed appearing on the search result.
How to tell search engines to remove them?
Removing those posts or pages from search engines depends on the platform you are using to run your website.
In this article, I’m going to show you how to remove these posts or pages using WordPress and Blogger.
I will start by showing you the general idea of how to remove pages from search engines, then after that how to apply it.
The General Idea
In general, to remove posts or pages from search engines, you should put a special meta tag in your HTML which will tell search engines to not index them.
The problem in adding a directive to search engines to not index your page is that if you have no coding knowledge, it will be difficult for you to know whether the HTML in which you are going to add the Meta tag is of that particular post/page or is shared.
If the latter is the case, adding the Meta tag to that HTML will result in deindexing many other pages that you do not want to be deindexed.
For a shared HTML, one must have some coding knowledge so that they can control which page should be deindexed through conditions: IF, ELSE IF, ELSE, etc.
In the next few lines, I’ll show you how I added an HTML tag to my blogger website to deindex archive pages.
Deindexing Archive Pages in Blogger
In blogger, all pages share only one HTML page.
Blogger can distinguish between pages with some special conditions like for example: “IF” this page is an archive page or index page “DO THIS”. IF IT IS NOT, DO THAT.
To deindex the “archive pages” only, I had to add the meta tag that tells Google and other search engines to not index the pages, to the HTML <head> of the website.
The meta tag looks as follow: <meta content=’noindex’ name=’robots’/>.
Because it is a shared HTML, I had to use the special conditions provided by Blogger to not affect all other pages but the intended pages only.
To check if the current page is an archive page, the following code does the trick:
<b:if cond=’data:blog.pageType = "archive"’>
The code should be ended with a </b:if> to tell Blogger that the condition ends there.
Also, the meta tag should be put between the beginning and the end of the condition. So, the final code should look like the following:
<b:if cond=’data:blog.pageType == "archive"’>
<meta content=’noindex’ name=’robots’/>
In human language, the code is telling Blogger to add a noindex to pages of the type archive.
To add the code to Blogger HTML:
1. Copy the above condition with the meta tag.
2. In the Dashboard, click on Theme, then Edit HTML.
3. On your keyboard click CTRL + F then type </head in that search bar that appears.
4. You’ll be taken to </head>, right before it, paste the condition that you just copied.
As you may have noticed, for the code to work, it should be inserted anywhere between <head> </head>
Deindexing Pages in WordPress
Deindexing pages in WordPress is an easy thing to do.
All is needed here is installing a plugin like Yoast SEO which will help you visually set any individual page, post, or even a group of pages to noindex so that Google and other search engines ignore them or deindex them if they are already indexed.
To know how to noindex URLs using Yoast SEO, here’s a detailed article, written by Yoast SEO themselves showing you the different options available in the plugin: “How do I Noindex URLs?”.
Now, after a month or so, you will notice that those pages have totally disappeared from search engines.
To learn how to speed up the deindexing of those posts or pages, read the article “How to Speed up the Deindexing of Posts or Pages”.