wordpress google analytics dashboard

How to Fix Yoast’s WordPress SEO Sitemap 404 Error

seo wordpress plugin

Image credit: yoast.com

Are you getting a 404 Error using the Yoast SEO WordPress plugin?

The WordPress SEO by Yoast plugin is a complete SEO WordPress plugin and among the best and most popular SEO plugins for WordPress out there. It has been downloaded well over a million times and many users never experience any difficulties with it at all. However for some users, it hasn’t worked as well. One issue that has been encountered fairly often is getting a 404 error when generating sitemaps using Yoast. It should be noted that this Yoast SEO plugin for WordPress problem is generally caused by other poorly coded plugins and themes, and not by the Yoast plugin.

How to Fix Yoast’s WordPress SEO Sitemap 404 Error

For the majority of people experiencing the 404 Error when generating a sitemap with the Yoast SEO WordPress plugin, the following steps have resolved the problem:

    1. Open your .htaccess file. This can be done by going to WordPress SEO plugin > Edit Files option
    2. After opening your .htaccess file add the following code:
      • # WordPress SEO ‐ XML Sitemap Rewrite Fix
      • <IfModulemod_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 ‐ XML Sitemap Rewrite Fix

Need your images ordered properly? Try installing a WordPress image gallery plugin. If you fail, you can easily ask us to help you!

For the majority of those that experienced this 404 Error, the above solution resolved the problem. For some two additional steps were needed:

  • Uncheck the sitemap option in Yoast’s SEO plugin and save your settings
  • Recheck the sitemaps option in the Yoast plugin

Adding steps 3 and 4 to the fix pretty much resolves any issues that adding the code alone doesn’t. As stated before this is not really a problem with the Yoast plugin. The majority of those using the Yoast SEO plugin never have any problems with it. However if you ever have the 404 Error come up while generating a sitemap with Yoast, now you know the steps to take in order to fix the problem. Many plugin problems are the result of poorly written code. Unfortunately problems caused by a poorly coded plugin aren’t confined to the plugin at fault. The may end up affecting plugin that otherwise never present difficulties. When you use our WordPress custom plugin development service, we test every plugin we create extensively before releasing it.

Our custom plugins into integrate your website smoothly

Part of our plugin development involves testing every plugin looking for bugs and possible conflicts with other popular plugins. Our development team uses good coding practices and adheres to all required guidelines and standards. Although we can’t test them with all of the plugins out there, we ensure plugins we develop work with the better known and popular plugins as well as every plugin installed on your website. The combination of following good coding practices, adhering to regulations and guidelines, and extensive testing keeps possible problems to a minimum. Additional advantages of our service include:

  • Guarantees on all work we provide
  • Affordable rates and no hidden charges
  • Complete customer confidentiality including intellectual property protection
  • Always available customer support 24/7

Contact us for a custom plugin that can be installed easily and works smoothly with your other WordPress plugins!