• Resolved Alex

    (@alexhooley)


    I’ve noticed that when you have a site with no trailing slash in the WP permalink settings, RankMath also removes the trailing slash from your homepage’s canonical.

    WordPress correctly keeps the homepage’s trailing slash in the actual root URL, but RankMath removes it in the canonical.

    Permalink settings: example.com/%postname%

    Actual homepage URL: https://example.com/
    Wrong canonical homepage URL: https://example.com

    Actual post URL: https://example.com/post-1
    Correct canonical post url: https://example.com/post-1

    Removing the trailing slash from the canonical on a page/post is correct behaviour as it matches the URL and the permalink settings. But shouldn’t the homepage always keep the trailing slash in the canonical? It’s my understanding that the trailing slash can’t be removed from the homepage/root URL?

    When you deactivate RankMath, the canonical for the homepage correctly shows the trailing slash.

    I’ve tested this on multiple sites, all with the same behaviour.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support Jaideep Asrani

    (@jaideeprm)

    Hello @alexhooley,

    Thank you for contacting Rank Math support.

    WordPress forces the trailing slash to the homepage URL but our plugin uses the permalink structure to generate the canonical URL. That’s why the canonical URL of the homepage doesn’t have a trailing slash.

    It won’t cause any issues as Google considers both versions as same for the homepage URL, and they will index it without showing any issues or errors regarding the canonical URL.

    Please do not hesitate to let us know if you need our assistance with anything else.

    Plugin Support Rakibuzzaman Siam

    (@rakibuzzamansiam1)

    Hello @alexhooley,
     
    Since we have not heard back from you, we are going to close this thread for now. If you still need any assistance, please feel free to reopen this thread or create a new one, and we will be happy to help.
     
    Thank you.

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

You must be logged in to reply to this topic.