The XML sitemap of the SEO plugin has errors, does not appear or is blank, what happens? How do i fix it?

It is something that has happened to me a few times but it is quite confusing when the Yoast SEO XML sitemap (sitemap) or any other SEO plugin is not seen, shows errors or comes out blank.

Next we are going to see the possible causes of a tool as important as the XML sitemap of your SEO plugin, leaving blank, not showing or showing errors, and how to fix it .

For this we are going to see the 3 types of site maps with problems , because although it seems the same it has nothing to do with it, and the solutions are different:

  • Blank site map
  • Empty site map
  • Sitemap shows 404 error

But before…

Where is my sitemap?

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

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

So, depending on the active SEO plugin, check your sitemap on the correct path , as a reason for not seeing the sitemap could simply be that you are not accessing it correctly.

Blank site map

sitemap blank sitemap

Here we are talking about when when putting the URL of your sitemap ( sitemap.xml or sitemap_index.xml , depending on the plugin) the page is shown totally or partially in white , without showing anything, no header or links or anything.

In this case we are going to check some things …

Check the source code

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

view page source code from browser

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

I see the source code

If you see the source code; For example, this would be the source code for a submap index sitemap, like the one created by Yoast SEO, All in One SEO, and most plugins.

sitemap xml source code

Yes, despite seeing the emp
ty page when accessing the site map, seeing the source code if its content is displayed, it may be for several reasons, namely …

Cache issues

Your sitemap exists, as you can see in the source code, but some persistent cache prevents it from being displayed . This is not very common, as most modern cache 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 the caches that you have active on your site and the server.
  2. Exclude the sitemap path from your site’s cache.
  3. Empty the CDN cache if you have it active.
  4. Empty your browser’s cache.
  5. Deactivate and reactivate the sitemap feature in your SEO plugin, in order to force it to be generated again, emptying its possible caches.
  6. Visit your sitemap from an incognito window of the browser, or in a browser that does not save cache or cookies, such as Tor .

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

Style sheet issues

Another very common reason that the XML sitemap of your SEO plugin is not displayed, but the source code is displayed, may be because the style sheet does not load, so the sitemap exists, but at the same time not loading font styles, colors, etc., not visible .

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 that is shown will be like this: tudominio.com/wp-content/plugins/wordpress-seo/css/main-sitemap.xsl

You just have to copy the path and paste it into the address bar of the browser and 3 things can happen:

  1. It is shown with rare colors – By rare we mean that some links are seen in black, others in gray and others in blue. This is not a problem but simply that, by browser settings, the links are seen differently depending on whether you have already visited them or not.
  2. Displays with errors – This is because it was not generated correctly:
    • Deactivate and activate the sitemaps feature of your SEO plugin to test to see if it regenerates correctly.
    • Disable the minimized and / or combined CSS of your optimization plugin or exclude this path from optimization.
  3. I get a server error message – This will be due to a server or installation rule preventing the stylesheet from loading in the required path, usually for safety. In this case, you should check the following:
    • Deactivate the security plugin: If it is fixed, activate it again and review its settings until you find the one that is preventing the loading of the stylesheet. Normally it will be a rule that prevents the execution of code in the system folders ( wp-content , etc.)
    • Look in .htaccess file in case 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 file’s code, rename it to deactivate it and then go to Settings → Permalinks in your WordPress administration and, without touching any settings, save changes. This will create a .htaccess , to check if the problem was coming 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 access to system folders. Specifically, I would look in the wp-content folder, and if there is a .htaccess file, check its rules to see if any prevent the loading of CSS, or when in doubt, rename it to deactivate it.

Problem with the path

Another possibility is that you have WordPress configured so that the style sheet path is not resolved correctly.

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

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

Except for custom settings, the addresses should be the same, otherwise the SEO plugin might have trouble resolving the stylesheet URL, and for this reason not display.

You should assess if you can / should change these routes or contact plugin support for this special case.

Empty site map

sitemap empty xml sitemap

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

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

  • You have not published anything yet – In which case it is totally normal that the sitemap does not show any 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 on your sitemap.
  • You have misconfigured the sitemap – It could also be that you have simply turned off the display of ALL your content types on the sitemap. By default it does not usually happen, since all SEO plugins show all types of content by default, but a wrong configuration can cause that, having deactivated certain types of content so that they are not displayed on the site map, and also not have anything posted on which you do want to be displayed, result in the sitemap showing no links. Of course, you can also have configured in the sitemap settings (or in the appearance settings in the Yoast search engine) of your plugin that no content is displayed.
  • The rewrite rules are incorrectly configured – By default, WordPress creates rewrite rules so that the server displays the URLs of your site as you have configured them in the permalink settings, but sometimes these can collide with the URLs of the maps of your SEO plugin site. A quick check would be, as we saw before, go to Settings → Permalinks in your WordPress administration and, without touching any settings, save changes. This will create a .htaccess , to check if the problem was coming 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.

  • The URL to the sitemap is incorrect – It could be that you are trying to access a sitemap path that does not correspond to the one generated by your SEO plugin, or that you have simply typed it wrong. In the first section of this guide you have a summary of the URLs of the site maps of the most popular SEO plugins. So, if for example, you try to access your sitemap at tudominio.com/sitemap.xml but your SEO plugin uses another one, for example tudominio.com/sitemap_index.xml is very likely that the browser will show a 404 error. However, this is not very common, as most SEO plugins “know” the routes that other plugins use for sitemaps, and they usually include automatic redirects from the routes of other plugins to that of your sitemap. Otherwise you can use a plugin like Redirection to create permanent redirects of the routes that show error to the current one.
  • The sitemap does not have published content – This is not usually the case with the index of sitemaps that all SEO plugins create, but it can happen that you access a URL of a submap of the site, such as categories, tags, etc. and the URL shows a 404 error when there is no content published in that taxonomy. The solution is simple: Configure that submap not be displayed until you have something published on it. Of course, most modern SEO plugins will not show links to submaps that do not have published content but … it could happen.
  • Rewrite rules are misconfigured – As we saw in the previous case when we were talking 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 sometimes SEO plugin developers have specific rewrite rules for their sitemaps.

And up to here!

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

( 6 votes, average: 5 ) Rate this article to help improve the quality of the blog
Share on Twitter Share on Facebook Share on Pocket Share on LinkedIn Share on WhatsApp Share on Telegram

Did you like this article? You can’t imagine what you’re missing on YouTube !

About Us

We are BE OF THEM, a team specialized in the field of digital marketing and programming, our headquarters is in Germany, and our activity has expanded to reach all parts of the Middle East, especially the Arab Gulf countries.

Do you need to raise your site's score?

We have the perfect solution for marketing your business

Contact Us

Call us, or message us by email & whatsapp

We will be happy to talk to you, and knowing everything about your work.

All rights reserved, © 2021