How to fix The XML sitemap of your SEO plugin(Blank, empty, 404).

It is something that has happened to me a couple of times. It is when the XML sitemap of your SEO plugin is not visible, shows errors or comes out blank.

Here we are going to see the possible causes of the problems of such an important tool as the XML sitemap of your SEO plugin coming up blank, not showing or displaying errors, and how to fix it.

To do this we will see the 3 types of sitemaps problems, because although it seems the same thing, it is not, and the solutions are different:

  • Blank sitemap
  • Empty sitemap
  • Sitemap shows error 404

But first…

Where is my sitemap?

First of all, the first check you should do is to see if you are actually trying to access your sitemap correctly, so the first thing is to check that you are using the correct path to access it.

  • WordPress (native) – yourdomain.com/wp-sitemap.xml
  • Yoast SEO – yourdomain.com/sitemap_index.xml
  • Rank Math – yourdomain.com/sitemap_index.xml
  • All in One SEO – yourdomain.com/sitemap.xml
  • SEOPress – yourdomain.com/sitemaps.xml

So, depending on the active SEO plugin, check that your sitemap is in the correct path, as one reason you don’t see the sitemap could simply be that you are not accessing the sitemap correctly.

Blank Sitemap

blank sitemap

Here we are talking about when you put the URL of your sitemap (sitemap.xml or sitemap_index.xml, depending on the plugin) the page is shown totally or partially blank, without showing anything, neither header nor links or anything.

In this case, let’s check a few things…

Review the source code

Right-click on the page and choose the option to show the page source code.

view page source through right-click

Depending on what you see, the solution will be different…

see the source code

If you look at the source code; for example, this would be the source code for a submap index sitemap, as created by Yoast SEO, All in One SEO and most plugins.

source code

If, instead of seeing the page empty when accessing the sitemap, when viewing the source code, its content is displayed, it may be for several reasons, namely…

Cache problems

Your sitemap exists, as you can check in the source code, but some cache prevents displaying it. It’s not very common, as most modern caching plugins automatically exclude the sitemap from the cache, but it could happen….

To check if this is the reason for the failure do the following:

  1. Empty all caches you have active on your site and server.
  2. Exclude the sitemap path from your site cache.
  3. Clear the CDN cache if you have it active.
  4. Clear your browser cache.
  5. Disable and re-enable the sitemap feature in your SEO plugin to force it to be generated again, clearing any sitemap caches.
  6. Visit your sitemap from an incognito browser window, or in a browser that does not save caches and cookies, such as Tor.

If that was the problem you should see the sitemap normally.

Stylesheet problems

Another very common reason for not displaying the XML sitemap of your SEO plugin, but the source code is displayed, may be because it does not load the stylesheet, so the sitemap exists, but by not loading font styles, colors, etc., it is not seen.

To check if this is the problem check the source code, in it you will find a path to the stylesheet, for example, in Yoast SEO the path shown will be like this: yourdomain.com/wp-content/plugins/wordpress-seo/css/main-sitemap.xsl

Just copy the path and paste it into the browser address bar and 3 things can happen:

  1. It displays with weird colors – By weird we mean that some links are displayed in black, some in gray and some in blue. This is not a problem but simply that, due to browser settings, the links are displayed differently depending on whether you have already visited them or not.
  2. Displayed with errors – This is because it has not been generated correctly:
    • Disable and enable the sitemap feature of your SEO plugin to test to see if it is generated correctly again.
    • Disable the minimized and/or combined CSS of your optimizations plugin or exclude this path from optimization.
  3. A server error message appears – This will be due to a server rule or your installation preventing the stylesheet from loading in the required path, usually for security. In this case you should check the following:
    • Deactivate the security plugin – If this is fixed re-activate it and check your settings until you find the one that is preventing the stylesheet from loading. Usually it will be a rule that prevents the execution of code in the system folders (wp-content, etc.).
    • Look in the .htaccess file of the installation to see if any rule of the current security plugin, or a previously active one, prevents the loading and/or execution of CSS. When in doubt, if you don’t know how to interpret the code in the file, rename it to disable it and then go to Settings Permalinks in your WordPress administration and, without touching any settings, save changes. This will create a new, clean .htaccess to check if the problem came from there.
    • Look for an .htaccess file in your installation folders: Sometimes, either a currently active security plugin, or one that was active in the past, may have created an .htaccess file with specific rules to prevent code execution and accesses to system folders. Specifically, I would look in the wp-content folder, and if there is an .htaccess file check its rules to see if any prevent CSS loading, or if in doubt, rename it to disable it.

Problem with the route/path

Another possibility is that you have WordPress configured in such a way that the stylesheet path is not resolved correctly.

To check this, in the WordPress general settings, the paths of the WordPress address and site address should be exactly the same:

  • Both addresses in the same URL.
  • Both URLs with or without www.
  • Both URLs without / at the end.

Except for custom configurations, the addresses should be the same, and otherwise the SEO plugin may have problems resolving the stylesheet URL, and for this reason not be displayed.

You will have to evaluate if you can/should change these paths or contact plugin support for this special case.

Empty Sitemap

empty sitemap

Here we are going to address a different problem, and that is when the sitemap header is displayed but the sitemap does not show any links.

There are several reasons why you might be seeing the XML sitemap without any links:

  • You haven’t published anything yet – In which case it is totally normal for the sitemap to show no links, as there is nothing published to show. You may have created content, but it is still in draft or pending review, and until it is published the SEO plugin will not show it in your sitemap.
  • You have misconfigured the sitemap – It may also be that you have simply disabled the display of ALL your content types in the sitemap. By default this doesn’t usually happen, as all SEO plugins display all content types by default, but a misconfiguration can cause you to have disabled certain content types from displaying in the sitemap, and also have nothing published on the ones you do want displayed, resulting in the sitemap not displaying any links. Of course, you may also have configured in the sitemap settings (or appearance settings in the Yoast search engine) of your plugin to not display any content.
  • Rewrite rules are misconfigured – By default, WordPress creates rewrite rules for the server to display your site URLs as you’ve configured them in the permalinks settings, but sometimes these can clash with your SEO plugin’s sitemap URLs. A quick check would be, as we saw earlier, go to Settings Permalinks from your WordPress admin and, without touching any settings, save changes. This will create a new, clean .htaccess, to check if the problem came from there. If not you should contact the developer of your SEO plugin in case there are specific rewrite rules that should be applied to your sitemaps.

Sitemap shows 404 error

This error is also quite common, and the reasons can be several.

  • Incorrect sitemap URL – You may be trying to access a sitemap path that does not correspond to the one generated by your SEO plugin, or you may have simply mistyped it. In the first section of this guide you have a summary of the sitemap URLs of the most popular SEO plugins. So, for example, if you try to access your sitemap at yourdomain.com/sitemap.xml but your SEO plugin uses another one, for example yourdomain.com/sitemap_index.xml it is very likely that the browser will show a 404 error. Now, this is not very common, as most SEO plugins “know” the paths that other plugins use for sitemaps, and usually include automatic redirects from the other plugins’ paths to your sitemap path. Otherwise you can use a plugin like Redirection to create permanent redirects from the paths that show error to the current one.
  • The sitemap has no published content – It does not usually happen with the sitemap index that all SEO plugins create, but it can happen that you access a URL of a sub sitemap, such as categories, tags, etc. and the URL shows a 404 error because there is no published content in that taxonomy. The solution is simple: Configure not to display that submap until you have something published in it. Mind you, most modern SEO plugins will not show links to submaps that have no published content but … it could happen.
  • Rewrite rules are misconfigured – Just as we saw in the previous case when we talked about empty sitemaps, a 404 error can also be caused by poorly generated rewrite rules. The solution would be the same as we saw in the aforementioned section, and also sometimes SEO plugin developers have specific rewrite rules for their sitemaps.

And that’s it!

I hope I helped you if you had any error or problem displaying your XML sitemaps, otherwise tell us in the comments and we will try to solve it together.

Click to rate this post!
[Total: 0 Average: 0]

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top Skip to content