Ahrefs shows hreflang to redirect or broken page – WPML/Rankmath conflict

#570224
  • Resolved Anonymous
    Rank Math free

    Hi,

    When I translate products to a Russian language using WPML, somewhy, your plugin cause these products to have an error.

    Perhaps because having % in the link/href?

    When I disable Rankmath all the products in Russian language work perfectly. But, when I enable your plugin, all products links in Russia have an error “too many redirects”

    NB! I’ve added access to a staging site where you can disable, enable or update plugins/themes or anything else as I will delete it later anyway.

    Kind regards,
    Raido

Viewing 7 replies - 1 through 7 (of 7 total)
  • Anonymous
    Rank Math free

    So I found out that if I disable “Remove base” from Rankmath general settings -> Woocommercce then Russia product links works again.

    But why is it affecting only with Russia language products?

    Also, I need to keep remove base disabled for SEO…

    So how to fix it?

    Kind regards,
    Raido

    Anonymous
    Rank Math free

    WPML came back to me and they told me that they contacted your team and were told to use the following function to remove the redirect found from: https://rankmath.com/kb/filters-hooks-api-developer/#disable-custom-product-redirection

    I tested it on staging site, yes, it works, but I would like to be sure that disabling it won’t affect SEO on my main site?

    Hello,

    Thanks for reaching out to Rank Math support. I apologize for the inconvenience you’re facing.

    I tried to access the staging site you shared with us, but I couldn’t log in using the normal WordPress URLs. It seems that you have a custom login URL that is different from /wp-admin/ or /wp-login.php. Could you please share the correct login URL with us so we can check your site settings?

    That said, we are aware the Strip Category Base option can sometimes clash with WPML if you’re using WPML’s Taxonomy Translation to translate your category slug. This is a known issue that can cause issues on the translated archive page. WPML has acknowledged this issue and as at March 27th they are working on a fix.

    Until WPML releases a fix, you have two options to avoid this issue. You can either turn off the Strip Category Base option in Rank Math, or leave it on but don’t translate the category slug in WPML. If you choose the second option, the untranslated category slug won’t show up in the URL anyway, so it won’t affect your user experience.

    I hope this helps you understand and solve the problem. Please let me know if you need any further assistance.

    Best regards,

    Anonymous
    Rank Math free

    Yes, apologies. I had forgotten to unhide it. You should be able to use it now: /wp-admin/ (as seen in the sensitive)

    I have not translated category slugs.

    The issue only appears with all the translated products in Russian, not others.

    Kind regards,
    Raido

    Hello,

    In this case, you may need to apply the filter you have shared above to fix the product URLs when the Remove Base is enabled on your site.

    I tested it on staging site, yes, it works, but I would like to be sure that disabling it won’t affect SEO on my main site?

    No, it won’t affect your SEO since this filter is only applied to the translated URL without the base. We recommend keeping the filter active to prevent any issues with pages redirecting to themselves or causing infinite redirects when the option to “Remove base” is enabled.

    We have also tested the same in your staging site, and the products are loading fine when translating them.

    Hope that helps.

    Thank you.

    Anonymous
    Rank Math free

    Ok, thanks, that’s all for now.

    Hello,

    We are super happy that this resolved your issue. If you have any other questions in the future, know that we are here to help you.

    If you don’t mind me asking, could you please leave us a review (if you haven’t already) on https://wordpress.org/support/plugin/seo-by-rank-math/reviews/#new-post about your overall experience with Rank Math? We appreciate your time and patience.

    If you do have another question in the future, please feel free to create a new forum topic, and it will be our pleasure to assist you again.

    Thank you.

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

The ticket ‘Ahrefs shows hreflang to redirect or broken page – WPML/Rankmath conflict’ is closed to new replies.