Pagination noindex, follow + canonical

#452897
  • Resolved dnkttt
    Rank Math free

    Hello, I need some help regarding pagination. I tried to look for it on the forum but couldn’t find anything that would help me fix the issue.

    This is my first category page:
    https://xyz.com/category/business-finance-books/
    It has the index,follow tags, and canonical tag pointing to itself. That’s completely fine.

    This is the second category page:
    https://xyz.com/category/business-finance-books/page/2/
    Currently, it has noindex, follow tags but the canonical tag is missing.

    I tried pasting the code in the functions.php file

    add_filter( 'rank_math/frontend/canonical', function( $canonical ) {
    if ( is_paged() ) {
    $link = $_SERVER['REQUEST_URI'];
    $arr = explode('/p/', $link,);
    $canonical = home_url($arr[0]. '/');
    }
    return $canonical;
    });

    But it doesn’t work unless I put pagination on the index, follow.

    I want my pagination to look like this
    https://xyz.com/category/business-finance-books/page/2/
    noindex, follow, and canonical tag pointing to https://xyz.com/category/business-finance-books/

    Is it possible to have both noindex, follow tags on the second page and canonical tag pointing to the main page?

    Thanks in advance.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hello,

    Thanks for contacting us and sorry for any inconvenience that might have been caused due to that.

    The canonical tag is only added to a page when it is set as Index. The canonical tag is used to let search engines know if the page has the original content or not when it is set as Index. When a page is set as Noindex, there is no use of the canonical tag and that’s why our plugin doesn’t add it.

    Hope this clarifies your doubts. Please don’t hesitate to get in touch in case you need our assistance with anything else.

    dnkttt
    Rank Math free

    Hello Jaideep,

    I understand what you are saying. Since it has noindex tags, Google won’t index it and the bot will follow the other pages, which is totally fine. But I’d like to add the canonical tags besides that, just to make sure the bot knows what is the main page. Is it possible to do it with RankMath? If it isn’t, please say so.

    Thanks.

    Nigel
    Rank Math business

    Hello,

    Noindex and rel=canonical should never be mixed. Here is an article quoting a Google representative on the issue: https://www.searchenginejournal.com/google-dont-mix-noindex-relcanonical/262607/

    It might be technically possible, but we cannot help you with this.

    Hope that helps. Please let us know if you have questions.

    Hello,

    Since we did not hear back from you for 15 days, we are assuming that you found the solution. We are closing this support ticket.

    If you still need assistance or any other help, please feel free to open a new support ticket, and we will be more than happy to assist.

    Thank you.

Viewing 3 replies - 1 through 3 (of 3 total)

The ticket ‘Pagination noindex, follow + canonical’ is closed to new replies.