WordPress Showing Error Establishing A Database Connection
How To Remove Indexed WordPress Categories, Tags, & Attachment Links From Google
This is a part of our Question and Answer series. If you have any questions related to Blogging, SEO, and/or WordPress, feel free to drop your queries via our contact form. Selected questions will be answered via a blog post. You can also check out previous questions answered here at ShoutMeLoud:
This is a question by Irfan Siddiqui from realtimetricks.com.
“I am facing issues with site indexing. I own a WordPress blog and despite having ‘noindex’ tags on all of my tags and categories pages, Google has indexed WordPress tags and categories pages anyway. How can I deindex these tags and category pages?”
Google Indexing Issue with WordPress Attachments, Tags & Categories
This is one of the common indexing issues where Google indexes a few pages from your blog despite you adding a noindex tag. This is normal, and as soon as Google recrawls your site, it will respect the noindex tag and will deindex these parts of your blog.
This may take some time, but here are a few things which you can do to speed up the process.
First, make sure your Robots.txt is not blocking access to the tags and categories pages.
If a few of your pages are already indexed in Google and you have added the noindex tag, Google may have stopped crawling of that part of your site and never see the noindex tag because Robots.txt is blocking access to crawlers.
Robots.txt exclusion is only useful for parts like Wp-admin and WP-content.
Moreover, it’s not a good idea to stop crawling pages like tags and categories using robots.txt as it will hamper the crawling of your deeper pages. The best way to stop indexing is by adding a noindex tag, which you can easily do by using WordPress SEO by Yoast.
Now in the case of Irfan’s blog, he has not blocked the tags and categories pages using Robots.txt, but before adding noindex tags, Google has already indexed those pages.
Here is a quick solution for anyone facing a similar problem.
First, you can check what pages of your site is indexed in Google by typing this search operator into Google:
- site:domain.com (replace domain.com with your domain)
Make sure you use the noindex option for tags and categories pages in WordPress SEO by Yoast or the Meta Robots plugin.
If you are using the Thesis theme, you can find this option under Site option > Document head > Robots meta tag > Noindex categories and tags.
- Login to your Google Webmaster Tool
- Go to Site Dashboard > Google Index > Remove URL’s
Now, usually our tags and categories pages are seen as a directory from a search engine’s point of view.
We can use the directory removal option to remove the complete directory from the noindex tag. Within 24-48 hours, all of your categories and tag pages will be out of Google’s index.
So you need to add www.domain.com/tag/ and www.domain.com/category/ and select “Temporarily hide directory”.
Hit “Submit Request” and now you’ve gotten rid of tags and categories pages from Google’s search index.
Getting rid of WordPress attachment ID links
This is another thing which not only creates duplicate content issues, but also adds low-quality content into Google Search. We can again fix this issue by using the Yoast SEO WordPress plugin.
Also, here is a practice that you should be following: When you upload an image, make sure your image link URL is either blank, or if you want to make it clickable, use the “Link to Image” option.
See this screenshot:
This will ensure no such links will be indexed in the future.
Here are configuration settings for plugins which I mentioned above:
WordPress SEO by Yoast setting:
WordPress SEO dashboard > Advanced > Permalinks > Put a tick on “Redirect attachment URLs to parent post URL.”
That’s it and it will redirect all such >attachment_id= links to its respective post. In a few days, Google will deindex all such links.
I hope this quick solution will help anybody facing a similar issue. Do let me know if you’ve ever faced a similar WordPress indexing issue like Irfan. Did this solution fix the problem? Let me know in the comments!