Support » Fixing WordPress » Put Nofollow,Index tag on all /page/*

  • Resolved betheone

    (@betheone)


    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

Viewing 15 replies - 1 through 15 (of 15 total)
  • Moderator Kathryn

    (@zoonini)

    Automattic Happiness Engineer

    Create a robots.txt file instead and put your disallowed category there.

    http://www.robotstxt.org/

    Thanks for your answer but with the robots.txt you can put NOFOLLOW, not NOINDEX.

    <?php if ( is_page() ) { ?>
    <meta name="robots" content="noindex,follow" />
    <?php } ?>

    Put this in your header.php somewhere.

    Moderator Kathryn

    (@zoonini)

    Automattic Happiness Engineer

    Heh – Chadrew, I was just about to suggest a conditional in header.php. 😉

    betheone – I misunderstood your question, sorry.

    @chadrew thanks a lot, now I’m on iPad, tomorrow I’ll try it 😉

    @zoonini don’t worry! Thanks for your time!!

    Hi guys,

    I’ve tried but It doesn’t work 🙁 have you an idea of the reason?

    Thanks!

    The problem is “is_page” works on “pages”, not “pagination” of categories. 🙂

    Moderator Kathryn

    (@zoonini)

    Automattic Happiness Engineer

    I think chadrew and I are/were both confused about what exactly you are trying to achieve. 😉

    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? 🙂

    Moderator Kathryn

    (@zoonini)

    Automattic Happiness Engineer

    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?

    The problem is not the “follow”, but the “noindex”. I want Google follow links in pages of categories, but NOT to index them.

    Moderator Kathryn

    (@zoonini)

    Automattic Happiness Engineer

    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.

    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..

    I’ve found a solution 😉

    <?php if ($paged) { ?>
    <meta name="robots" content="noindex,follow" />
    <?php } ?>

    Hope it helps!

    THANKS!

    @betheone

    thnx dude

    i have implemented it

    but how to check out if it has worked out or not
    ?

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘Put Nofollow,Index tag on all /page/*’ is closed to new replies.