How to Fix the Yoast Sitemap 404 Error in WordPress

Wondering why your Yoast SEO plugin sitemap isn’t working on your WordPress website? If you are getting a 404 error (page not found) for your Yoast sitemap, the fix is extremely easy and requires no coding skills!

How to find your Yoast sitemap

If you aren’t sure where to find your Yoast sitemap, it’s located on the left hand menu in WordPress. Hover your mouse over “SEO” and then click on “XML Sitemaps“.

Yoast Sitemap Fixes

1. See if “Check this box to enable XML sitemap functionality.” has a checkmark. If it does, uncheck it and click “Save Changes“, then checkmark it and click “Save Changes” again. Click on the button “XML sitemap” (or go directly to the sitemap URL, which is

Yoast sitemap Settings

Are you still getting the dreaded 404 – Page not found?

404 Page not Found

2. Don’t panic, this fix is really easy and takes only a few seconds and is likely the cause of your issues. All you have to do is “refresh” your permalinks!

  • On the left hand side menu in WordPress (the same place you found the “SEO” menu item), hover your mouse over “Settings” and then click on “Permalinks“.
  • Don’t change anything, just click “Save Changes“.
  • Now go back and check your sitemap to see if it is working!

If your Yoast sitemap is still not working, try these other fixes:

  • You may be having a plugin conflict. Try deactivating all of your plugins and see if the sitemap is working. If it is, start activating your plugins one by one, while checking the sitemap after each activation to see if a certain plugin is having a conflict with Yoast.
  • Yoast suggests that if you are running W3Total Cache plugin, add this bit of code to the browser cache settings page as an exemption:
    Then “refresh” your permalinks again (steps are listed above).
  • Lower the max entries per sitemap (it is default to 1000, so if you don’t have that many pages, try lowering it to 100 and see if that fixes it.). This setting is located in the spot where you checkmarked the box to enable your Yoast sitemap.
  • We have also seen a fix by adding code to the .htaccess file (Please do not attempt to alter this file if you are unfamiliar with it, and instead contact a professional web developer). However, it has been reported that Google webmaster tools may still read the sitemap as a 404, even though it is visible to you and your website visitors so be sure to double check your sitemap in Webmaster tools after adding this code:
    # WordPress SEO – Sitemap Rewrite Fix
    <IfModule mod_rewrite.c>
    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] </IfModule>
    # END WordPress SEO – Sitemap Rewrite Fix
    You may need to go in and uncheck, save, then checkmark again and save the XML sitemap functionality (steps are listed above in step 1).

Let us know which one of these fixes worked for your WordPress site or if you found a fix that isn’t listed here!