Site logo

[Resolved] Deindexing paginated archive pages (NOT PAGE 1 of an ARCHIVE!)

Home Forums Support [Resolved] Deindexing paginated archive pages (NOT PAGE 1 of an ARCHIVE!)

Home Forums Support Deindexing paginated archive pages (NOT PAGE 1 of an ARCHIVE!)

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #2526682
    Mark

    Hi there,

    I just want to make sure if this code will do the trick. I’m trying to save crawl budget and I don’t think anything after page 1 in an Archive needs to be indexed. In fact, deindexing anything after page 1 should help SEO?

    This would go into functions.php

    1) Can you confirm the code will work

    2) Is there any way to test to see if it worked other than waiting to see what Google displays in a search?

    3) Do you think this is a bad idea?

    URL examples in the private area.

    Thanks in advance!
    Mark

    #2526687
    Fernando
    Customer Support

    Hi Mark,

    I believe this inquiry will be more suited for an SEO-expert.

    It may be good to ask for insights in our Facebook Group as well: https://www.facebook.com/groups/1113359788719597

    This article may also be insightful: https://www.searchenginejournal.com/noindex-category-archive-pages/374867/#close:~:text=Crawl%20Bloat%20%26%20Index%20Bloat

    #2526721
    Mark

    Ok, will check it out.

    Will the code work?

    #2526723
    Fernando
    Customer Support

    Which code? I don’t think a code was shared.

    #2526752
    Mark

    Whoops, sorry! Here it is:

    /*
    ==================
    Set Sub-Pages of Archives to Noindex
    ==================
    */

    function mtt_noindex_paged() {
    if ( is_paged() ) {
    echo ‘<meta name=”robots” content=”noindex,follow” />’;
    }
    }
    add_action(‘wp_head’, ‘mtt_noindex_paged’);

    /*
    ==================
    END OF Set Sub-Pages of Archives to Noindex
    ==================
    */

    #2526762
    Fernando
    Customer Support

    Yes, that should work for paged pages.

    More information about that code here: https://developers.google.com/search/docs/crawling-indexing/robots-meta-tag

    #2526810
    Mark

    Thanks Fernando. Will check that out

    #2526821
    Fernando
    Customer Support

    You’re welcome, Mark!

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.