The main file listing section sitemaps—the sitemap index—returns 200, but one of its links leads to an error. Checking only the top-level file leaves the entire inaccessible section unchecked. Open the index, list the links to product, service, and article sitemaps, then check each sitemap. An accessible top-level file does not mean the others are working too.
Open every sitemap listed in the main file
Google supports sitemap indexes for listing multiple sitemap files. Official documentation.
Save the main XML file and list the links to the child sitemaps. Note which sections each file covers: products, articles, services, and language versions. Then check them independently. Make a list of files without duplicate URLs. If a section sitemap is missing, find out whether the CMS is still generating it. Don’t simply remove a link to an existing section from the index without checking where its pages should go.
Google does not support an index that lists other sitemap indexes. In the top-level file, list page sitemaps directly. If the address in a loc element points to another sitemapindex, change the structure generator. Nested index error in Search Console.
Different errors require different fixes
| File | What it contains | What to do | Required result |
|---|---|---|---|
| /sitemap_index.xml | List of files | Check every loc | 200 at the top level isn’t enough |
| /products.xml | 403 | Check accessibility | A public response is required |
| /news.xml.gz | Compressed XML | Check decompression | Don’t mistake it for HTML |
| /old.xml | File has been deleted | Remove the link or restore the file | Don’t leave 404 |
Check the GET request for each sitemap
Run the following commands in a terminal; pass them to a developer if you don’t work with one yourself. Request full addresses, including the protocol and domain. For each redirect, record the next address from Location to catch redirects to an old host or a generic page. Check with GET; HEAD behavior can give an incomplete picture. If rate limiting occurs, reduce concurrency and agree on a diagnostic mode instead of repeating requests aggressively. If a request times out, record that the file could not be retrieved. This does not prove that the sitemap is empty: it may have taken too long to generate or transfer. Include the necessary headers and a snippet of the response body in the report, removing cookies and any private values that appeared in the response to the failing route.
curl -sS -D headers.txt -o response.html 'https://example.com/services.xml'For each sitemap, first compare the HTTP status from headers.txt with the contents of response.html. If it contains an HTML error or an empty response, the child file’s XML has not yet been checked. Successfully retrieving the index does not confirm that this sitemap works. Replace example.com with your domain; this GET request does not change the site’s settings. curl documentation.
Check gzip and XML
The .xml.gz extension does not confirm that you received an archive. The server may return an HTML error or already-decompressed XML. First download the file without requesting additional HTTP compression, then check the archive and decompress it:
curl -sS -H 'Accept-Encoding: identity' -D news.headers -o news.xml.gz 'https://example.com/news.xml.gz'
gzip -t news.xml.gz
gzip -dc news.xml.gz > news.xmlgzip -t exits without output and returns code 0 for a valid archive. If it reports an error, inspect news.headers and the beginning of the downloaded file: it may contain a login page or plain XML. Don’t try decompressing it again until you have identified the response format. The gzip -dc command preserves the original archive and writes the decompressed text to news.xml.
Now check the XML and print the URLs:
python3 - <<'PYCODE'
import xml.etree.ElementTree as ET
root = ET.parse("news.xml").getroot()
print("Корневой элемент:", root.tag)
for el in root.iter():
if el.tag.endswith("}loc"):
print(el.text)
PYCODEFor a page sitemap, the root element ends with urlset; the addresses from loc will appear below. A parsing error means the saved file is not complete, valid XML. Two files may return 200, but one decompresses successfully while the other is damaged. Save the download, decompression, and XML parsing results separately.
Restore the file or update the list
When restoring services.xml, check which source publishes it to disk or through a CMS route. If the file is no longer needed, its link should disappear from the main index, and the pages in that section should appear in a new sitemap. Don’t remove a child file’s loc just to get a green status while its section still exists. If the issue is temporary unavailability, it is better to restore generation and access. After making a change, request both the index and the file itself: the two public responses may be cached independently and update at different times.
Check the sitemaps and a few pages from each
Every link in the main index leads to accessible XML for the relevant section. Open pages from the beginning and end of the services sitemap and check their contents. If some files could not be retrieved, list them separately instead of saying “the sitemap works.”
Also read: Sitemap.xml: a complete guide to creating and optimizing it for SEO and Errors in sitemap.xml: how to find and fix them. Site checks are available on the reChecker technical audit page.