Bulk remove canonical tags with rank math?

  • Hi there,

    I got a client, who was using Yoast before I was taking care of her SEO. Now I can see, she manually changed the URL structure, and still have the canonical tag pointing to the previous URL.

    Is there a way to bulk remove them from specific categories? It is over 4.000+ so it would take a lot of time doing manually.

    Thanks.

Viewing 1 replies (of 1 total)
  • Hello,

    Thank you for contacting Rank Math and sorry for any inconvenience that might have been caused due to that.

    Right now we don’t have a way in the UI to make those changes but we have some filters in our API you might use (modifying it to have some conditionals to match only the content you want):

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

    Looking forward to helping you. 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 1 replies (of 1 total)

The ticket ‘Bulk remove canonical tags with rank math?’ is closed to new replies.