-
Hi Rank Math Team,
I’m experiencing an issue where the URLs in my sitemap do not include trailing slashes, even though my WordPress permalink settings are correctly configured to use the “Post name” structure, which should end URLs with a slash (e.g., https://trendnama.com/sample-post/).
Here’s the situation in detail:
WordPress permalink is set to Post name, and I’ve saved the settings multiple times.
The URLs on the front end redirect correctly to include the trailing slash (e.g., /my-post → /my-post/).
However, in the Rank Math sitemap (/sitemap_index.xml), the post URLs do not end with a trailing slash (e.g., https://trendnama.com/my-post).
This causes a 301 redirect on every sitemap URL, which might delay or negatively affect Google indexing.
I’ve already:
Flushed permalinks
Disabled and re-enabled the Sitemap module in Rank Math
Cleared all cache (WordPress, server, and Cloudflare)
I’ve even verified that the canonical URLs and internal links are using the correct trailing slash format.
Despite all of the above, the sitemap still outputs non-trailing slash versions of post URLs.
Can you please advise on:
1. Why the sitemap is ignoring the permalink structure?
2. Whether this is a known issue?
3. How to force the sitemap to always output URLs with a trailing slash?
Thank you for your time and assistance.
Best regards,
https://trendnama.com
My email is h*********@g********
The ticket ‘Sitemap URLs Missing Trailing Slashes Despite Correct Permalink Settings’ is closed to new replies.