Rank Math PollyLang

#697155
  • Resolved Ashwin Singh
    Rank Math free

    Hey,

    I tried using “How to Make Polylang Compatible With Rank Math,” but it looks like this code is just not working for me.

    The main problem with Rank math is showing the Canonical of the homepage instead of translated pages. It seems like this code is not making any difference. What can I do to troubleshoot?

    Here is the link to my site https://chatgptespanol.app/

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

    I’m sorry to hear that you’re experiencing issues with Rank Math and Polylang. It seems like the code provided for making Polylang compatible with Rank Math is not resolving the problem of showing the canonical of the homepage instead of translated pages.

    To troubleshoot this issue, you can try updating the canonical URL in Rank Math. Here are the steps to follow:

    1. Navigate to the Pages section of Google Search Console and click on the Not indexed tab.
      Not indexed

    2. Click on the “Alternate page with proper canonical tag” status.
      Alternate page with proper canonical tag

    3. This will show you a list of all the pages on your website that are labeled with this status.
      List of the affected pages

    4. Once you have a list of the affected pages, you need to check if they include the correct canonical URL. If not, you would need to change them using Rank Math.

    5. You can change the canonical URL using the meta box in Rank Math. By default, Rank Math uses the current post/page URL as the canonical URL, so you would only need to alter this setting if you wish to change it to something else.

    If you cannot find the Advanced tab in Rank Math, please enable the Advanced Mode from WordPress Dashboard → Rank Math SEO.

    Enable Advanced Mode

    If you’re still facing issues after following these steps, I recommend reaching out to the Rank Math support team for further assistance. You can contact them through their support page: Rank Math Support.

    I hope this helps! If you have any other questions or need further assistance, feel free to ask.

    Sources:
    Multilingual SEO with Rank Math SEO & WPML » Rank Math
    Alternate Page with Proper Canonical Tag Status in Google Search Console » Rank Math

    Hey,

    I just want to specify that the Canonical tag works for post but for static homepage, which is translated in multiple languages canonical to Homepage and not to the domain.com/id etc.

    Hey,

    For now i have solved the issue by manually specifying Canonical URl by using Advanced tab feature of Rank math.

    Hello,

    Apologies for the inconvenience.

    In this case, please add the following filter to your site to fix the canonical issue:

    add_filter( 'rank_math/frontend/canonical', function( $canonical ) {
    	$canonical = 'https://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];
    	return $canonical;
    });

    Here is how to add a filter to your site: https://rankmath.com/kb/wordpress-hooks-actions-filters/

    Then remove the canonical you have added under the Advanced tab.

    Let us know how this goes.

    Thanks, This worked. Please update the guide “How to Make Polylang Compatible With Rank Math” for this issue.

    Hello,

    Glad that helped.

    Sure, and if you have any other concerns, please don’t hesitate to contact us anytime to assist you further.

    Looking forward to helping you.

    Thank you.

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

The ticket ‘Rank Math PollyLang’ is closed to new replies.