-
Hello Rank Math team,
I’m experiencing an issue with the sitemap on my WordPress website:
https://lingoculture.krAfter reinstalling Rank Math, the sitemap URL (https://lingoculture.kr/sitemap_index.xml) returns a 404 error.
I followed your official documentation here:
https://rankmath.com/kb/sitemap-404-error/As instructed, I added the following rewrite rules to my .htaccess file (above the Breeze cache section):
# START of Rank Math Sitemap Rewrite Rules
RewriteEngine On
RewriteBase /
RewriteRule ^sitemap_index.xml$ /index.php?sitemap=1 L
RewriteRule ^([^/]+?)-sitemap([0-9]+)?.xml$ /index.php?sitemap=$1&sitemap_n=$2 L
RewriteRule ^([a-z]+)?-?sitemap.xsl$ /index.php?xsl=$1 L
# END of Rank Math Sitemap Rewrite RulesHowever, immediately after saving the file, my entire website went down with a **500 Internal Server Error**.
I contacted my hosting provider (Cloudways), and they confirmed that this .htaccess code caused a server-level misconfiguration.
They restored my site by removing the Rank Math rewrite rules.After recovery, my site works fine again, but the sitemap (https://lingoculture.kr/sitemap_index.xml) still returns a 404 error.
Meanwhile, the default WordPress sitemap (https://lingoculture.kr/wp-sitemap.xml) works normally.Here’s what I have already tried:
1. Cleared all cache from Breeze plugin and Cloudways Varnish.
2. Disabled and re-enabled the Sitemap module in Rank Math.
3. Resaved permalinks in WordPress.
4. Excluded sitemap URLs from caching as suggested in your documentation.
5. Reinstalled Rank Math completely.Despite all of these steps, Rank Math’s sitemap still shows 404, and adding the rewrite rules again results in a 500 Internal Server Error.
—
**Update:**
After the Internal Server Error occurred, my hosting provider (Cloudways) investigated the issue.
They confirmed that the rewrite rules from your documentation caused the Apache configuration to fail.Here’s what they said:
> “The code provided by Rank Math is causing an error, which means there is an issue in the code itself.”They also shared the exact server log showing the error:
This confirms that the .htaccess rewrite rule example from your guide:
https://rankmath.com/kb/sitemap-404-error/
does not work properly on Cloudways (Apache 2.4 / Debian).Could you please verify and provide a corrected version of the rewrite rule that is compatible with Apache 2.4 / Cloudways environments?
Thank you for your help and time!
You must be logged in to reply to this ticket.



