Archive Pages for Blogs are Canonicalised to the main blog page

#642248
  • Resolved Anonymous
    Rank Math free

    Hello, I am having issues because for some reason the archive pages for my blogs that are not the main archive page are showing as canonicalized to the main page and the even weirder part is I have rank math running on another one of my websites as well and it doesn’t do it there.
    The website with issue:https://rainierdoor.com/
    Website without issue: https://ohdpugetsound.com/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Anonymous
    Rank Math free

    Just to Specify I don’t want the secondary archive pages to be canonicalised to the main archive page.

    Hello,

    Thank you for contacting Rank Math and bringing your concern to our attention. I’m sorry for any inconvenience this issue may have caused you.

    Rank Math adds a self-referencing canonical URL by default for your paginated pages.

    However, if it is not working on your site, then you can try the following filter to force the self-referencing canonical URL of your blog pagination:

    add_filter( 'rank_math/frontend/canonical', function( $canonical ) {
    	global $wp;
    	$current_slug = home_url( $wp->request );
    
    	if ( is_paged()) {
    		$canonical = $current_slug . '/';
    	}
    	return $canonical;
    });

    And here’s a guide on how you can add a filter to your website:
    https://rankmath.com/kb/filters-hooks-api-developer/

    Hope that helps.

    Thank you.

    Anonymous
    Rank Math free

    This did not work it still shows the main archive page it is active right now if you want to check the rainierdoor website.
    also is there any settings that I could have changed in the past causing rank math to then make the canonical of paginated pages have a canonical of the main page

    Hello,

    If the code didn’t work on your website, we might need to take a closer look at the settings. 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.
    Sensitive Data Section

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

The ticket ‘Archive Pages for Blogs are Canonicalised to the main blog page’ is closed to new replies.