Common XML Sitemap Errors
If you’re getting an error on or about your XML Sitemap, and you don’t know what it means, you can find it here, along with the cause and its solution!
If the ‘Detected’ date is not today’s date, please test the individual sitemap to verify whether or not the issue has been resolved.
Get access to our kick-ass support team with Yoast SEO Premium
Sitemap Errors (General)
|My sitemap is not using the URL format. For example, it does not include/exclude www or has http instead of https.||The sitemap uses the same protocol as the WordPress Site URL.||Go to Admin > Settings > General and change the site URLs to the correct protocol.
If you have recently switched your URL format, you may have incorrectly formatted URLs in your database. Please backup your database and complete a search and replace of the old to new format.
|My sitemap is a white page or a header with no URLs.||Your XSLT file is unavailable, the XML is invalid, or the “Do not process 404 errors for static objects with WordPress” setting is checked in W3 Total Cache.||Check this page to see which error applies to you, and fix it accordingly.|
|My sitemap doesn’t work on an Apache server||Most likely, you haven’t implemented our rewrite rules.||This article has more advice on troubleshooting the sitemaps on Apache servers: Yoast XML Sitemaps on Apache servers|
|My sitemap doesn’t work on an NGINX server||Most likely, you haven’t implemented our rewrite rules.||This article has more advice on troubleshooting the sitemaps on NGINX servers: Yoast XML Sitemaps on NGINX servers|
|My plugin won’t create a sitemap||The settings of your permalinks aren’t properly saved.||
|The sitemap has gray links.||This is how we built it.||Gray links in your sitemap identify recently visited URLs in your own browser. Google does not see the browser formatting as they retrieve the xml source code. Learn more here.|
|My new videos are at the bottom of my second sitemap||This is how we built it.||This way only the last video sitemap changes and Google only needs to re-fetch that one instead of re-fetching all the video sitemaps all the time. The last update time will tell Google what’s new.|
Errors In Google Search Console (formerly Webmaster Tools)
|XML declaration allowed only at the start of the document||There are probably several lines of whitespace preceding the
||To be sure this is the case, follow the steps on this page.
After that; start searching. Something in your WordPress install, either a plugin or your theme is outputting whitespace, and it shouldn’t… It’s not a bug in our plugin. A conflict check may
|Unsupported format. Your file appears to be an HTML page||You’re using W3 Total Cache and you’ve ticked the setting to hide the sitemap from normal visitors.||You should create an extra user agent group. You can do that by following the steps on this page.|
|URL blocked / restricted by robots.txt||This error appears when Google is unable to crawl the specific URL due to a robots.txt restriction.||Check this page to see which restriction is applied to your site and fix it accordingly.|
|Your Sitemap or Sitemap index file doesn’t properly declare the namespace.||This error appears when something on your site is modifying URLs after the sitemap is generated.||This is virtually impossible for us to locate or fix as it’s not something controlled by our plugin. See this article for more information.|
|Missing XML tag. This required tag is missing. Please add it and resubmit.||This error appears when the sitemap contains zero items.||Please create content for the sitemap. See this article for more information.|
|General HTTP error: 404 not found||There’s a handful of causes depending on which sitemap displays the error.||If it’s your sitemap index, you should follow these steps.
If it’s an individual sitemap, you should follow these steps.
If it’s your GEO (Local SEO) sitemap, you should follow these steps.
If you have a custom post type ‘Video’, add a single line of code to your functions.php.
If you have a custom post type ‘News’, add a single line of code to your functions.php.
|Unknown news site||Your website may not be approved for Google News.||Please verify the URL submitted to Google News exactly matches the URL in your sitemap.
If you have not applied for inclusion, please visit the Google News Publisher Center.
Errors In Bing Webmaster Tools
|Download of the sitemap or feed failed.||The sitemap may not be accessible to Bing.||Use Bing’s Mobile Friendliess Test Tool to see if Bing can read the sitemap.
If the tool successful loads feedback, resubmit the sitemap to Bing.
If the tool is unsuccessful, your site may be slow or have restrictions set for Bing.
Check out the site speed tools we recommend to locate areas where you can improve your speed. Your webhost may also be helpful when a site is slow.