• Just wondering if this is possible. I want to (for example) remove this page from google:
    http://superstoker.com/page/2/

    However, I want the links on this page (specifically the posts) to be indexed. The problem is that Google is landing people on these pages, and they seem quite out of context in my site’s current design.

    Possible? Bad idea? Any thoughts greatly appreciated.

Viewing 8 replies - 1 through 8 (of 8 total)
  • You can use a rel="noindex" on the pages hyperlinks, this can be done with the theme.

    Thread Starter dlawton

    (@dlawton)

    no sure how to do it, im using pagenavi plugin for links to additional pages, i guess i will refer to the plugin support for help adding in additional tags to the links

    thanks though, i was heading in the wrong direction trying to actually make the page noindex/nofollow as opposed to the link to it

    try to edit wp-pagenavi.php file and add to every
    echo '<a href=
    a rel="noindex" attribute.

    e.g.:
    echo '<a href="'.clean_url(get_pagenum_link()).'" title="'.$first_page_text.'"> '.$first_page_text.' </a>';
    into
    echo '<a href="'.clean_url(get_pagenum_link()).'" title="'.$first_page_text.'" rel="noindex"> '.$first_page_text.' </a>';

    Thread Starter dlawton

    (@dlawton)

    great, working fine, thanks!

    however, I realized I have a new problem. On page 2 (and every other page), I now have a pagenavi link going back to page 1, which is now marked as noindex. What will the effect be of doing this? Will spiders ignore this since page 2 is noindex anyway? Obviously the spider isn’t going to stop indexing page 1, because it’s the homepage, so is there any reason not to do this?

    cheers

    I don’t think thats a big problem but just to be sure u can try to change
    echo '<a href="'.clean_url(get_pagenum_link()).'" title="'.$first_page_text.'"> '.$first_page_text.' </a>';
    back.

    Thread Starter dlawton

    (@dlawton)

    didn’t work unfortunately, thanks for the help Ornani

    Thread Starter dlawton

    (@dlawton)

    i solved it by taking out the noindex for the first_page_text (as suggested), this ensured when you are on the last page for example, the link to the ‘first page’ is indexed.

    next, i replaced this:
    echo '<a href="'.clean_url(get_pagenum_link($i)).'" title="'.$page_text.'"> '.$page_text.' </a>';

    with this:

    if ($i == $start_page){echo '<a href="'.clean_url(get_pagenum_link($i)).'" title="'.$page_text.'"> '.$page_text.' </a>';}
    else{echo '<a href="'.clean_url(get_pagenum_link($i)).'" title="'.$page_text.'" rel="noindex"> '.$page_text.' </a>';}

    Then I found that the next and previous links were still indexing pages past the first page (The << and >> links) so I just removed these completely by deleting these lines:
    next_posts_link($pagenavi_options['next_text'], $max_page);
    previous_posts_link($pagenavi_options['prev_text']);

    Don’t forget to add rel=”noindex” for the last page link

    echo '<a href="'.clean_url(get_pagenum_link($max_page)).'" title="'.$last_page_text.'" rel="noindex">'.$last_page_text.'</a>';
Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Stop spiders from indexing past first page’ is closed to new replies.