betheone
Member
Posted 8 months ago #
Hi everyone,
I'm going crazy to do this type of job. What I want to do is to put in all page (so, for example "/category/nameofcategory/2/") the robots tag:
<meta name="robots" content="noindex,follow" />
So I want them "FOLLOW" but "NOINDEX". I can do it for homepage pages with the plugin "SEO Ultimate", but I can't do it for all subpages of category.
How can I do it?
Thank you very much!
Leo
Create a robots.txt file instead and put your disallowed category there.
http://www.robotstxt.org/
betheone
Member
Posted 8 months ago #
Thanks for your answer but with the robots.txt you can put NOFOLLOW, not NOINDEX.
chadrew
Member
Posted 8 months ago #
<?php if ( is_page() ) { ?>
<meta name="robots" content="noindex,follow" />
<?php } ?>
Put this in your header.php somewhere.
Heh - Chadrew, I was just about to suggest a conditional in header.php. ;-)
betheone - I misunderstood your question, sorry.
betheone
Member
Posted 8 months ago #
@chadrew thanks a lot, now I'm on iPad, tomorrow I'll try it ;)
@Zoonini don't worry! Thanks for your time!!
betheone
Member
Posted 8 months ago #
Hi guys,
I've tried but It doesn't work :( have you an idea of the reason?
Thanks!
betheone
Member
Posted 8 months ago #
The problem is "is_page" works on "pages", not "pagination" of categories. :)
I think chadrew and I are/were both confused about what exactly you are trying to achieve. ;-)
betheone
Member
Posted 8 months ago #
I can make it clear with an example:
http://shebshi.wordpress.com/category/observations-commentary/page/2/
This is an internal page of category :) so.. /category/ home page: follow,index, and category/name/page/../ follow,noindex.
Clear? :)
Why do you need to follow those pages? Spiders can get into the links on those pages via other routes, such as via the homepage, no?
betheone
Member
Posted 8 months ago #
The problem is not the "follow", but the "noindex". I want Google follow links in pages of categories, but NOT to index them.
I understand. But why do you want Google to follow links in paginated category pages?
Category pages normally just re-display posts that are already displayed elsewhere in a blog, and Google can spider those links from those alternative routes, such as when the post is displayed in the main blog, i.e. without "category" in the URL.
This way you can simply disallow /category/ in robots.txt. I still don't understand why you want those pages followed.
betheone
Member
Posted 8 months ago #
I prefer this way for several reason, one of these is I don't have /category/ in the "URL", so I need to do something like Disallow: */page/*, and this include subpages of home page, and it makes difficult to Google to index all the pages...
And if I have "FOLLOW" in categories, instead "DISALLOW", it gives more linkjuices to posts..
betheone
Member
Posted 8 months ago #
I've found a solution ;)
<?php if ($paged) { ?>
<meta name="robots" content="noindex,follow" />
<?php } ?>
Hope it helps!
THANKS!
techaddict009
Member
Posted 4 months ago #
@betheone
thnx dude
i have implemented it
but how to check out if it has worked out or not
?