My sitemap is blank, what’s wrong?
- Blank sitemap – white screen, no text
- Empty sitemap – header, no URLs
Is your sitemap giving a 404 error or another error? Please read one of the following articles:
Did you know Yoast SEO Pemium comes with an easy to use redirect manager? This tool will warn you whenever you delete a page and it will help you create a redirect in just a few seconds. No more worries about 404s!
A blank sitemap is basically a white screen with no header, no links, nothing at all. There could be several things wrong:
Sitemap source code
Check whether the source of the sitemap shows you the data you would expect in an XML sitemap. Not sure how to see the source code? Follow the steps in this article.
If the sitemap source code is empty, you may have a static file, theme, or plugin conflict. Please check for theme or plugin conflicts and, if no conflicts are found, FTP into your site to locate and remove any static sitemap files.
If the sitemap source code contains data, make sure the XSL file, linked at the very top of the XML file, is available. Sometimes this file gets 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.
Then find the XSL stylesheet URL at the top and view it. You may need to copy/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. You should speak to your host provider and confirm nothing in your .htaccess file is preventing it from loading.
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 feature (steps here) to force a cache reset.
Most cache plugins allow you to exclude the sitemap URLs from being cached and/or minified. Please read this article for more information on the sitemap cache.
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. To solve this, follow these steps:
- Log in to your WordPress website.
When you’re logged in, you will be in your ‘Dashboard’.
- Click on ‘Settings’.
On the left-hand side, you will see a menu. In that menu, click on ‘Settings’.
- Click on ‘General’.
The Settings menu will expand providing you with additional options. Click on ‘General’.
- Check the ‘WordPress Address (URL)’ and the ‘Site Address (URL)’.
The URLs should use the preferred HTTP/HTTPS and www/non-www format that your site is set up to use.
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, you probably haven’t published anything recently. Per the Google guidelines, your news sitemap should contain only URLs for your 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.
Still not working?
Please read this article on how to get support. Please include a link to the sitemap URL along with any troubleshooting steps you have already completed.