My sitemap is blank, what’s wrong?

Do you see a white screen with no text when you open your sitemap? Or are there only headers in your empty sitemap, with no URLs? In this article, we’ll explain how you can solve problems with a blank or empty sitemap. 

Is your sitemap giving a 404 error or another error? Please consult our 404 ‘Page Not Found’ error article or our general XML sitemap error article.

Blank sitemaps

A blank sitemap shows a white screen with no header, no links, or any other content.

Sitemap source code

Check whether the source of the sitemap shows the data you expect in an XML sitemap. Not sure how to see the source code? Follow our instructions to see the page source code.

If the sitemap source code is empty, you may have a static file, theme, or plugin conflict. Please check for theme or plugin conflicts. If no conflicts are found, FTP into your site to locate and remove any static sitemap files.

Sitemap stylesheet

If the sitemap source code contains data, make sure the XSL file is available. This file may be blocked by .htaccess prevention of the wp-content directory.

You can find your XSL stylesheet by viewing your sitemap_index.xml and looking at the source code

The XSL stylesheet URL is at the top of the page. To view it, copy and paste it into the browser.

If the XSL file loads, then something else is causing the error. If it does not load, it may be blocked: speak to your host provider and confirming nothing in your .htaccess file is preventing it from loading.

Cache issue

If you have a cache plugin or server-side cache, please flush the cache. If the issue remains, please disable and re-enable the sitemap to force a cache reset.

Most cache plugins allow you to exclude the sitemap URLs from being cached and/or minified. You can read more about XML sitemaps in the Yoast SEO plugin.

Invalid XML code

Open the sitemap and the sitemap stylesheet in Firefox to see if any errors display. If an error displays, please read this article about common sitemap errors.

Mismatched site URLs

Yoast SEO uses WordPress site URLs to generate the sitemap. In rare cases, these URLs may not match the preferred URL format of your site. You can check your URLs in your WordPress Settings. Under General, you can check the WordPress Address (URL) and Site Address (URL) entries. The URLs should use the preferred HTTP/HTTPS and www/non-www format that your site is set up to use.

Empty sitemap

An empty sitemap shows the sitemap header but contains no links. The most common reason for an empty sitemap is no matched data and this typically happens with specialty sitemaps like video and news sitemaps. In other cases, you may need to add rewrite rules (htaccess, NGINX) and then clear all your cache.

Empty news sitemap

If your news sitemap is empty, check when you last published an article. Per the Google guidelines, your news sitemap should only contain URLs for articles published in the last two days.

Empty video sitemap

If your video sitemap is empty, the Video SEO plugin has not located any videos on your site. Please ensure you have set up the plugin correctly including the initial re-index of your videos to locate videos that were posted prior to the plugin activation. If the sitemap remains empty after re-indexing videos, please check for theme or plugin conflicts.

I still have a problem with my sitemap

Please contact support. Please include a link to the sitemap URL along with any troubleshooting steps you have already completed.

Did this article answer your question?

Thanks for your feedback!

Related articles

Get free SEO tips!