[wp-hackers] prevent indexing of page 2,3 and so on

Blue Chives info at bluechives.com
Fri Oct 22 10:51:57 UTC 2010


Hi Rich,

Rather then a plug in you could use the robots.txt file such as

User-agent: *
Disallow: /page/*
Allow: /page/1

If you wanted the pages to not appear in the google index then use the noindex directive instead/as well as the disallow directive.


Cheers


On 22 Oct 2010, at 06:32, Rich ZenMaster <richzenmaster at gmail.com> wrote:

> Do you know how to prevent indexing of pages past the home page in WP?
> I mean I don't want mysite.com/page/2, mysite.com/page/3 to be indexed.
> 
> This is because I use home.php for my theme, so that page/2, page/3
> are all the same.
> 
> Please give me a hint or a code snippet please, I don't want to add another
> plugin (robots meta).
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers



More information about the wp-hackers mailing list