An XML sitemap serves as a comprehensive file that lists all the webpages on your site that you want search engines like Google to crawl and index. It’s crucial to create it correctly, and in this article, we’ll outline some of the most common errors in XML sitemaps that can be identified through an SEO audit.
Most common errors in XML sitemaps
Can’t find XML Sitemaps – You can manually check this by adding a portion of the XML sitemap tag to the end of your website’s URL, resulting in a format like: ‘https://www.example.com/sitemap.xml’ or ‘https://www.example.com/sitemap_index.xml.’ You can also verify the presence of XML Sitemaps in both Google Search Console and your Robots.txt file. If you discover that your website lacks an XML Sitemap, the solution is to start by creating one. Following this, ensure that you include your XML sitemap in your robots.txt file and register it within Google Search Console.
XML Sitemap is not Included in Robots.txt – This error means that your XML sitemap is not included in your robots.txt file. To fix this, add the following line to your robots.txt file: Sitemap: https://www.example.com/sitemap.xml
XML Sitemap(s) is not Listed in GSC – This error means that one or more of your XML sitemaps is not listed in Google Search Console. To fix this, add your XML sitemaps to GSC by following these instructions: https://support.google.com/webmasters/answer/183668?hl=en&ref_topic=7225052.
3xx redirect in sitemap – One of the most common XML sitemap errors is the inclusion of pages that return a 3xx redirect. When this occurs, crawlers will follow the redirect instead of indexing the page. To fix this, make sure that all redirected pages are excluded from the sitemap. The sitemap should only include pages with the 2xx status code.
4xx client error in sitemap -This error means that there are URLs in your XML sitemap that return a 404 (file not found) error when visited. That means that the page has been deleted or replaced. If you have deleted the page, you should also remove it from your sitemap. If there is a valid page that serves as a replacement, include that in the XML sitemap. If you have moved the page to a new URL, exclude the old URL from the sitemap and add the new one instead.
5xx server error in sitemap – This error means that there are URLs in your XML sitemap that return a 500 (server error) error when visited. To fix this issue, you’ll need to contact the development team or host support, who can fix the server issue. If you need to solve the problem quickly, you should temporarily remove those pages from your sitemap until they get the 2xx status code.
Noindex page in sitemap – This error means that you have a page listed in your XML sitemap that you don’t want indexed by search engines. To fix it, remove the page from your XML sitemap.
Fix the XML Sitemap Errors on Your Website
XML sitemap errors can have a significant impact on your website’s ranking and organic traffic. If your SEO audit returned a couple of these errors, it is important that you take the time to address them so that your website can reach its full potential in terms of search engine visibility and organic traffic.