Canonical tag

#653805
  • Resolved Anonymous
    Rank Math free

    Good afternoon,
    Rank Math adds the “canonical” attribute to the pages, and I have it generated from WordPress.
    Can I delete that part? that is, do not add the attribute.
    Thank you!

Viewing 3 replies - 1 through 3 (of 3 total)
  • 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.

    Yes, Rank Math automatically adds a self-referencing canonical URL to your site if they are set to index.

    If you want to disable it, please use this filter on your site:

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

    And here’s a guide to adding the filter to your website:
    https://rankmath.com/kb/wordpress-hooks-actions-filters/

    Hope that helps.

    Thank you.

    Anonymous
    Rank Math free

    Excellent!
    Thank you!

    Hello,

    We are glad to hear that this issue has been resolved. Thank you for letting us know. This ticket will be closed now, but you can always open a new one if you have any other questions or concerns. We are here to help you with anything related to Rank Math.

    We appreciate your patience and cooperation throughout this process.

    Thank you for choosing Rank Math.

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

The ticket ‘Canonical tag’ is closed to new replies.