If your Rank Math sitemap link shows 404 Page Not Found, here is the simplest guide to fix it.

(example: https://yourdomain.com/sitemap_index.xml)

This issue is very common and happens because WordPress cannot load the sitemap URL correctly.


Why It Happens (Simple Explanation)

Your sitemap shows 404 because of:

  1. Broken WordPress rewrite rules
  2. Wrong or corrupted .htaccess file
  3. Cache plugins storing a 404 version
  4. Plugin conflicts
  5. Rank Math sitemap disabled

How to Fix It (Step-by-Step)

Follow these steps one by one.


1. Resave Permalinks (Fixes 90% of problems)

Go to:

WordPress → Settings → Permalinks → Save Changes

Do not change anything.
Just click Save.

This rebuilds WordPress rewrite rules.


2. Check Your .htaccess File

Your .htaccess must contain this code:

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress

If the code is missing, damaged, or different:

  1. Replace it with the above
  2. Save the file
  3. Test your sitemap again

3. Clear Cache

If you use any cache plugin (LiteSpeed, WP Rocket, WP Super Cache):

  1. Disable the plugin temporarily
  2. Purge all cache
  3. Open your sitemap again

Also clear Cloudflare cache if you use it.


4. Make Sure Sitemap Is Enabled in Rank Math

Go to:

Rank Math → Sitemap Settings → General

Check:

✔ Enable Sitemap – ON
✔ Image options (optional)
✔ Posts/Pages selected

Click Save Changes.


5. Turn Off Rank Math Add-Ons (If conflict)

Go to:

Rank Math → Dashboard

Turn OFF temporarily:

❌ Link Counter
❌ Image SEO
❌ Instant Indexing

This avoids plugin conflicts.


Final Step: Test Your Sitemap

Try opening:

👉 https://yourdomain.com/sitemap_index.xml
👉 https://yourdomain.com/post-sitemap.xml
👉 https://yourdomain.com/page-sitemap.xml

If they load correctly, the issue is fixed.


Summary

To fix the Rank Math sitemap 404 error:

  • Save permalinks
  • Fix .htaccess
  • Clear cache
  • Check sitemap settings
  • Disable conflicting plugins

This restores the sitemap instantly and keeps Google indexing your website properly.

Related Posts