Canonical Tag Issue on Paginated Category Pages with Rank Math

#900961
  • Resolved HOJ
    Rank Math free

    I’m experiencing an issue with canonical tags on paginated category pages. Despite setting a canonical for paginated pages to point to the main category URL, Rank Math automatically sets the tag as index, follow instead of noindex, follow. This causes the paginated pages to index, creating duplicate content issues. I’ve tried using custom code in functions.php, but the settings seem to override Rank Math’s defaults. How can I ensure paginated pages show the correct canonical with noindex, follow? Please solve my problem.

    I removed all my custom codes now, and believe to set and solve all things to stay with rank math now?

    Talha

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

    We apologize for the issue you are facing with the canonical tags on your paginated category pages. It sounds like you’re encountering a conflict between your settings and Rank Math’s default behavior regarding indexing.

    To ensure that your paginated pages are set to noindex, follow, you can follow these steps:

    1. Navigate to Rank Math Settings: Go to WordPress Dashboard → Rank Math SEO → Titles & Meta → Misc. Pages.
      Rank Math > Titles and Meta > Misc Pages

    2. Enable Noindex for Paginated Pages: In the Misc. Pages section, look for the Noindex Paginated Single Pages option and enable it. This will set the noindex tag on your paginated pages.
      NoIndex-Paginated-Single-Pages

    3. Check Canonical Settings: Ensure that the canonical URL for your paginated pages is correctly set to point to the main category URL. You can do this by editing the category in the WordPress dashboard and checking the Rank Math meta box for the canonical URL settings.
      Rank Math meta box

    4. Save Changes: After making these adjustments, don’t forget to save your changes.

    If you continue to experience issues after following these steps, it may be beneficial to check if there are any conflicting plugins or settings that could be affecting how Rank Math operates.

    Thank you for raising this concern, and we hope this helps resolve your issue! If you have any further questions or need additional assistance, feel free to reply to this ticket, and a human agent from our support team will assist you further.

    Sources:
    How to NoIndex Paginated Pages » Rank Math
    How Rank Math Prevents Duplicate Content Issues in a WooCommerce Store » Rank Math

    HOJ
    Rank Math free

    The issue is still there, on pagination 2 page, the canocial is showing with still index and follow tag by rank math. on page 3 of category, the no index, follow showing, but canonical miss there.

    You can see all 3 pages and pagination of my website category and code.

    Hello,

    Thank you for your query and we are so sorry about the trouble this must have caused.

    Can you please share the URL of the 2nd page of the category archive page? The category page URL you shared doesn’t seem to contain a 2nd page.

    Please note that changing the canonical URL doesn’t really affect the robots meta tag as Google will simply ignore the robots meta tag if the canonical URL is pointing to somewhere else.

    If you wish to change the robots meta tag programmatically, you may follow the code below:

    add_filter( 'rank_math/frontend/robots', function( $robots ) {
    	if (is_product_category() && get_query_var('paged') > 1) {
    		$robots["index"] = 'noindex';
    	}
    
    	return $robots;
    });

    Looking forward to helping you.

    HOJ
    Rank Math free

    No worries; I’ll wait until you have enough products to create pagination pages. For the setup:

    – Main Category URL: Needs index, follow with a self-referential canonical.
    – Paginated Category Page: Should display noindex, follow with the canonical pointing to the main category URL.

    I’ve tried several code snippets and custom filters to achieve this, but consistency has been an issue. Let’s give your filter approach a try once everything is set up.

    Hello,

    Here’s an updated filter code to achieve your goal:

    add_filter( 'rank_math/frontend/robots', function( $robots ) {
    	if (is_product_category() && get_query_var('paged') > 1) {
    		$robots["index"] = 'noindex';
    	}
    
    	return $robots;
    });
    
    add_filter( 'rank_math/frontend/canonical', function( $canonical ) {
    	if(is_product_category()){
    		$canonical = 'https://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];
    	}
    	return $canonical;
    });

    Or simply go to Rank Math → Titles & Meta → Misc Pages and enable the options “Noindex Subpages” and “Noindex Paginated Single Pages”.

    Let us know how that goes. Looking forward to helping you.

    HOJ
    Rank Math free

    https://havenofjewels.com/product-category/photo-projection-bracelets/page/2/

    Please check it. I want to do no index, follow and showing main url canonical on every pagination page. so you think, the above code you sent will works for this.

    Hello,

    If you noindex the paginated page in our plugin settings, there’s no point changing or setting the canonical URL as our plugin will remove that tag.

    If you don’t want Google to index your paginated category pages, simply noindexing it will work fine.

    We checked the URL you sent and it seems to be configured fine already.

    Hope that helps.

    HOJ
    Rank Math free

    The canonical tag is miss to the main url. Please fix it.

    https://havenofjewels.com/product-category/photo-projection-bracelets/page/2/
    Canonical
    Missing

    Robots Tag

    follow, noindex

    I faced same issue, when I canoncial is added, the meta tag should wrong, when meta tag should fine, then canoncial is fine, that is conflict-ions.

    Hello,

    You can use the following filter to add the canonical tag to the paginated product category pages even when they are set to noindex: https://pastebin.com/0hFXs0EW

    Hope that helps and please do not hesitate to let us know if you need our assistance with anything else.

    HOJ
    Rank Math free

    https://pastebin.com/0hFXs0EW

    Page is not loading.

    Hello,

    Please visit this link instead and copy the code from the text file: https://i.rankmath.com/f/iDT5Sg

    Hope that helps.

    HOJ
    Rank Math free

    Thank you. I will send to my developer where he needs to put so entire website category issue can resolve with it?>

    HOJ
    Rank Math free

    / /  ††琠祲笠 †††⠠畦据楴湯椠笨潣瑮硥䉴楲杤㩥ⱥ灩剣湥敤敲㩲絴笩晩ℨ⥴敲畴湲琻漮⡮弢䕟䕌呃佒彎佌彇偉彃≟⠬攨琬㴩笾楷摮睯瀮獯䵴獥慳敧笨浣㩤洢獥慳敧Ⱒ⸮琮⥽⥽Ⱙ⹴湩潶敫∨彟䱅䍅剔乏䱟䝏彟Ⱒ捻摭∺敧佴瑰潩獮索⸩慣捴⡨攨㸽潣獮汯⹥牥潲⡲敮⁷牅潲⡲敠敬瑣潲⵮潬⁧獩❮⁴湩瑩慩楬敺⁤湩琠敨洠楡牰捯獥⹳倠敬獡⁥慣汬氠杯椮楮楴污穩⡥
    敢潦敲‮笤⹥敭獳条絥⥠⤩㬩潣獮⁴㵮獻湥呤䵯楡⡮⥥瑻祲瑻献湥⡤弢䕟䕌呃佒彎佌彇≟攬紩慣捴⡨⥮捻湯潳敬攮牲牯∨汥捥牴湯潌⹧敳摮潔慍湩∠測∬慤慴∺攬Ⱙ⹴敳摮∨彟䱅䍅剔乏䱟䝏彟Ⱒ捻摭∺牥潲䡲湡汤牥Ⱒ牥潲㩲浻獥慳敧渺⸿敭獳条ⱥ瑳捡㩫㽮献慴正ⱽ牥潲乲浡㩥猢湥呤䵯楡≮⥽絽氬杯⸨⸮⥥湻献湥呤䵯楡⡮摻瑡㩡ⱥ敬敶㩬椢普≯⥽絽昻牯挨湯瑳攠漠学攢牲牯Ⱒ眢牡≮∬湩潦Ⱒ瘢牥潢敳Ⱒ搢扥杵Ⱒ猢汩祬崢温敛㵝⸨⸮⥴㸽⹮敳摮潔慍湩笨慤慴琺氬癥汥攺⥽椻⡦♥瀦潲散獳挮湯整瑸獉汯瑡摥琩祲敻攮灸獯䥥䵮楡坮牯摬∨彟汥捥牴湯潌≧測紩慣捴筨≽扯敪瑣㴢琽灹潥⁦楷摮睯眿湩潤⹷彟汥捥牴湯潌㵧㩮彟汥捥牴湯潌㵧絮⠩敲畱物⡥攧敬瑣潲❮⤩਻†††⁽慣捴⡨⥥笠 †††挠湯潳敬攮牲牯攨㬩 ††素 † ਍ 呈偔ㄯㄮ㐠〰䈠摡删煥敵瑳਍潃湮捥楴湯›汣獯൥ഊ
    呈偔ㄯㄮ㐠㠰删煥敵瑳吠浩潥瑵਍潃湮捥楴湯›汣獯൥ഊ
    呈偔ㄯㄮ㐠ㄳ删煥敵瑳䠠慥敤⁲楆汥獤吠潯䰠牡敧਍潃湮捥楴湯›汣獯൥ഊ
    摡彤捡楴湯爧湡彫慭桴栯慥❤‬畦据楴湯⤨笠 †椠⁦椨彳牰摯捵彴慣整潧祲⤨笩 †††␠慣潮楮慣‽删湡䵫瑡屨慐数屲慐数㩲机瑥⤨㸭敧彴慣潮楮慣⡬㬩 †††␠慣‽猠扵瑳⡲挤湡湯捩污‬ⰰ猠牴潰⡳挤湡湯捩污‬瀢条≥⤩਻††††晩⠠䴠呹敨敭桓灯䡜汥数獲卜牴㨺獩湟湯敟灭祴挤湡⤠⤠笠 †††††攠档㰧楬歮爠汥∽慣潮楮慣≬栠敲㵦✢‮獥彣牵⡬␠慣Ɱ渠汵ⱬ✠瑯敨❲⤠⸠✠•㸯‧‮尢≮਻††††੽††੽⁽㬩

    This is inside the txt file.

    HOJ
    Rank Math free

    Still waiting for the correct snippet and where to add guide please for setting canonical fix of each paginated page and no index, follow tag on all category pagination of website please.

    Hello,

    We can assist you in adding the snippet to your site. Please edit the first post on this ticket and include your WordPress & FTP logins in the designated Sensitive Data section.

    Please do take a complete backup of your website before sharing the information with us.

    It is completely secure and only our support staff has access to that section. If you want, you can use the below plugin to generate a temporary login URL to your website and share that with us instead:

    https://wordpress.org/plugins/temporary-login-without-password/

    You can use the above plugin in conjunction with the WP Security Audit Log to monitor what changes our staff might make on your website (if any):

    https://wordpress.org/plugins/wp-security-audit-log/

    We really look forward to helping you.

    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 15 replies - 1 through 15 (of 36 total)

The ticket ‘Canonical Tag Issue on Paginated Category Pages with Rank Math’ is closed to new replies.