how remove canonical tag from home page?

#72038
  • Resolved info bixines
    Rank Math free

    Hi, I’m using a multilingual website …
    language (fa , ar) is canonical to main language(en) …
    that’s mean:
    Main lang (en): <link rel=”canonical” href=”mmm.com” />
    lang2 (ar): <link rel=”canonical” href=”mmm.com” />
    lang3 (fa): <link rel=”canonical” href=”mmm.com” />

    i want this : <link rel=”canonical” href=”mmm.com/fa” />

    how can i fix it?

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

    Thank you for contacting Rank Math today.

    The addition of the language code in the URL should be done by default by your Translation plugin. However, you can edit the canonical URL in Rank math metabox in the Advanced tab.

    You can also customize the following filter and add it in your functions.php:

    
    /**
     * 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,

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

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

The ticket ‘how remove canonical tag from home page?’ is closed to new replies.