No-index all the posts of a category
-
Hi everyone!
I would like no-indexing all the posts of a specific category of my wordpress site.
The problem is that the structure of my URL is composed without /category/: www.site-name.ext/date/post-name/
so without /category-name/Is possibile to disallow the indexing of all the posts of the category via robots.txt?
Using Yoast Plugin I can put the no-index for each post, but I would like to put the no-index (or disallow/) a time for all the post of the category.
Thanks in advance for your help and sorry for my english.
- Mike
-
Sure, without /category/ in the URL structure I can't block Googlebot using the robots.txt
No problem, now I can use the noindex for all the posts.
Thank you so much Oleg.
Regards,
- MIke
-
With that code, Google won't index any pages within that particular category.
Unfortunately, without a specific folder pattern, you cannot block via robots.txt
-
Hi Oleg, thanks for your help.
I did just some tests and does it seems to work fine.
Do you think is possible to block Google bot to indexing all the post of a category?in this way (disallow/ in the robots.txt) I could save the Google crawle budget for the pages of my site that I want to index.
Thanks a lot for your help Oleg.
Have a nice weekend,- Mike
-
Wordpress Admin > Posts > Categories > Edit the category you want to noindex > Set "always noindex" for "Noindex this category" box
EDIT: looks like that just noindexes the actual category page.
Here is a workaround I found...
-
Find the category ID (WP Admin > Posts > Categories > Edit the category you want to noindex > look at URL for the tag_ID # (this is the category ID))
-
Edit your theme header and include:
<?php if (is_single() && in_category(array(###))) { echo ''; } ?>
where ### is the category ID
-
Got a burning SEO question?
Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.
Browse Questions
Explore more categories
-
Moz Tools
Chat with the community about the Moz tools.
-
SEO Tactics
Discuss the SEO process with fellow marketers
-
Community
Discuss industry events, jobs, and news!
-
Digital Marketing
Chat about tactics outside of SEO
-
Research & Trends
Dive into research and trends in the search industry.
-
Support
Connect on product support and feature requests.
Related Questions
-
Should I set paramters to maximize the number of producs on all category pages for a retail website?
We have a retail website with over 20K products and do many things to reduce duplicate content including canonicals & parameters. In setting up parameters in Google Search Console, we have told Google to ignore the option to list more products, so the category pages that are indexed have only the default 12 products on them. I don’t want to create too much duplicate product content by doing this, but if there are only 12 products on a category page, the content is very thin Is it better to have as much product content as possible? My question: Should we set the parameter to follow the default (12 products) or should set it to 200 so there are more products associated with the category page?
On-Page Optimization | | apsltd1 -
Title tag of product page including category keyword?
I'm doing some work on a site that essentially is about giving and getting reviews. It's heirarchy has categories and products within those categories. For the title tag of the product pages, they currently have "Best {Category} | {Product} Reviews" I've advised them that they should remove the "Best {Category}" part because a) they're already targeting the category pages themselves and b) from a user perspective, the product page should just have a title tag that makes sense for that particular page (the page is not necessarily the "best" and certainly is not a series of products within that category). I wanted to post here to confirm that my advice is sound. Thanks.
On-Page Optimization | | jim_shook0 -
Google indexing
Hi In my site I have 2 blogs, the first blog is a standard blog, every post is informative and over 6oo words with pictures and all of them are keyworded. The second blog is basically a journal of bike rides i go on, with a picture and about 100 - 300 word writeup. I use a portfolio plugin to get this online. My question is should I noindex nofollow all of these posts. Im not sure if google will see it as a lot of uninformative noncene, I dont write these as blog posts they are a journal I post 1 or 2 a day. What is the normal practice for this... they are not keyworded or seo'd I dont want them to affect my seo or rankings. Thanks Chris
On-Page Optimization | | mrcsleonard0 -
SEO for page that is made up of multiple posts
When a page is made up of lots of individual wordpress posts, how should it be handled from an SEO perspective? Should the individual posts be hidden from the search engines and only the page url which contains all the posts collectivity be indexed? Page in question below: http://teammateworld.com/case-studies/ Thanks in advance.
On-Page Optimization | | Rich_H0 -
Do sites built with WordPress work in China get indexed by Baidu?
I think that WordPress.com is banned, but are websites that are created by WordPress get banned?
On-Page Optimization | | CoGri0 -
How do i block an entire category/directory with robots.txt?
Anyone has any idea how to block an entire product category, including all the products in that category using the robots.txt file? I'm using woocommerce in wordpress and i'd like to prevent bots from crawling every single one of products urls for now. The confusing part right now is that i have several different url structures linking to every single one of my products for example www.mystore.com/all-products, www.mystore.com/product-category, etc etc. I'm not really sure how i'd type it into the robots.txt file, or where to place the file. any help would be appreciated thanks
On-Page Optimization | | bricerhodes0 -
Google Indexing
Hi, We recently launched a new version of our site on the Magento platform. I submitted a new sitemap and on the first crawl only 7 pages out of 132 were indexed...a few days later and we now have 107 indexed (phew). My question is this....how on earth do i find out which pages are indexed and more importantly not indexed? For all i know they might be really important ones so I need to be able to identify the missing pages so i can work on getting them indexed. Nic
On-Page Optimization | | nicc19760 -
Does my actual blog post title have any effect once I create a title tag for SEO purposes?
A little confused about this. Reason I ask is that using my actual title for my title tag sometimes isn't the best for getting ranked, so the title and title tag are sometimes not the same.
On-Page Optimization | | seo_f20120