Wrong Homepage Canonical
-
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-1Removing 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.
You must be logged in to reply to this topic.