Removing the canonical tag for the post archive page

#839975
  • Resolved Mikee Generoso
    Rank Math free

    Hi, I see there’s no option to control the canonical tag for the post archive page. I want to remove it since I don’t want it canonicalised, and I have paginated pages. How do I do this?

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

    Thank you for reaching out with your query about removing the canonical tag for the post archive page in Rank Math. To remove the canonical tag for the post archive page, you can follow these steps:

    1. Go to your WordPress Dashboard.
    2. Navigate to Rank Math SEO > Titles & Meta > Misc. Pages.
    3. Look for the option Noindex Paginated Single Pages and enable it.

    Enabling this option will set the noindex tag on paginated pages, including the post archive pages, preventing them from showing up in search results.

    If you have any further questions or need assistance, feel free to ask. We are here to help!

    Kind regards.

    Sources:
    How to NoIndex Paginated Pages » Rank Math
    Rank Math ‘Titles and Meta’ Options and Settings
    Bulk Editing Options in the Rank Math SEO Plugin
    Advanced Tab in Rank Math SEO’s Meta Box
    How to Fix the Submitted URL Seems to Be a “Soft 404” Error » Rank Math

    No, I dont want them to not appear in search, I want to remove the canonical tag.

    Can someone here confirm if this is the right filter that allows me to edit/remove the canonical tag from the post archive page? Thanks

    /**
    * Allow changing of the canonical URL.
    *
    * @param string $canonical The canonical URL.
    */
    add_filter( ‘rank_math/frontend/canonical’, function( $canonical ) {
    return $canonical;
    });

    Hello,

    Yes, you can use and customize that filter to modify the canonical URL.

    Could you please share the archive URL you’re referring to so we can check?

    We have asked since Rank Math adds a self-referencing canonical URL on indexed pages. Also, removing the canonical is done by setting the page to noindex.

    Looking forward to helping you.

    Hello,

    I have updated the sensitive data as requested. Can you please check further?

    Thank you.

    Hello,

    The following filter should remove the canonical URL from the blog archive page.

    add_filter('rank_math/frontend/canonical', function($canonical) {
        if (is_home()) {
            return false;
        }
        return $canonical;
    });

    Let us know how this goes. Also, let us know if you have further questions or concerns.

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

The ticket ‘Removing the canonical tag for the post archive page’ is closed to new replies.