What a sitemap does and what it doesn't
An XML sitemap is a list of URLs you point Google to for crawling, with the date of each page's last significant change. Its main job is helping Google discover new or updated pages, and it matters most for large sites, pages with few internal links and new sites with few backlinks.
A sitemap doesn't guarantee indexing. Google treats it as a hint, and the Search Console Sitemaps report shows "discovered pages", not indexed ones. Google also says it ignores priority and changefreq and uses lastmod only when it is consistently accurate. Many problems start here: people expect the sitemap to do a job it doesn't do and neglect the one it does.
How to read the Sitemaps report in Search Console
In Search Console open Indexing > Sitemaps. Each submitted sitemap has one of three statuses:
- Success: the file was read without errors and its URLs are queued for crawling.
- Has errors: the file was fetched but parts of it are invalid. Valid URLs are still used; click the sitemap to see the error list with line numbers.
- Couldn't fetch: Google could not download the file.
To see how many sitemap pages are indexed, open the Page indexing report filtered to that sitemap from its row. Setting up the property and the other reports worth checking monthly are covered in our Google Search Console guide.
"Sitemap couldn't fetch": causes and checks
This is the message that worries people most, but the documented causes are few: the file is blocked by robots.txt, there's an unresolved manual action, the address returns 404, the server had a temporary error, or crawl demand for the site is low. Newly submitted sitemaps sometimes stay on "Couldn't fetch" for a few days even when the file is fine.
Checks, in order
- Open the exact URL you submitted in a private window: it must return 200 and show XML, not an HTML page or a redirect to a login page.
- Check
/robots.txt: noDisallowrule should cover the sitemap path. - Make sure the submitted domain matches the property:
https://www.andhttps://without www are different addresses. - If you use a CDN or firewall (Cloudflare, a security plugin), make sure it doesn't block or challenge Googlebot on the XML file.
- Check Security & Manual Actions for open manual actions.
If everything checks out, wait a few days. After a failed fetch Google retries for several days and then stops; in that case, once the problem is fixed, submit the sitemap again.
Format errors: XML, dates and URLs not allowed
When the status is "Has errors", the message usually points to a line. The most frequent ones:
- Parsing error: the XML is invalid, often because of an unescaped
&in a URL with parameters. It must be written as&. - Invalid date:
lastmodmust use W3C Datetime, for example2026-09-28; if you include a time, a time zone is required. - URL not allowed: URLs must share the sitemap's domain, protocol and path. A sitemap on
https://www.example.comlisting URLs without www triggers this error. - Unsupported format: wrong header or namespace, or curly quotes instead of straight ones, typical of files pasted from a word processor.
- Too many URLs or file too large: the limit is 50,000 URLs or 50 MB uncompressed per sitemap.
Redirected, 404, noindex or non-canonical URLs
These problems often don't appear as errors in the Sitemaps report but in Page indexing filtered by sitemap: "Page with redirect", "Not found (404)", "Excluded by noindex tag", "Alternate page with proper canonical tag". The principle is simple: a sitemap should list only final URLs that return 200, are indexable and are canonical.
Typical mismatches are URLs with and without a trailing slash, old URLs left over after a migration, filtered or internal search pages, and product variants with parameters. If Google picks a different canonical from the one in your sitemap, the issue is usually conflicting signals rather than the sitemap, which we cover in our article on when Google chooses a different canonical. If the URLs are correct but stay out of the index, see causes and fixes for crawled, currently not indexed.
Multiple sitemaps and index files
Beyond 50,000 URLs or 50 MB you split the sitemap into several files and list them in an index file. Two recurring mistakes:
- Nested indexes: an index file may list only sitemaps, not other indexes. Search Console reports it as an incorrect sitemap index format.
- Incomplete URLs in the index: every child sitemap must be listed with its absolute URL, not a relative path.
Submitting the index file in Search Console is enough; child sitemaps appear under it. Also add a Sitemap: https://www.example.com/sitemap.xml line to robots.txt, which helps other search engines.
Shopify, WordPress and Next.js: typical errors
Shopify
Shopify automatically generates /sitemap.xml as an index of separate sitemaps for products, collections, pages and blogs, and updates it as you add content. You can't edit it by hand. The most common mistakes are submitting the sitemap while the store is still password-protected, which stops Google from reading it, and not submitting a sitemap for each international domain. More platform details are in our Shopify technical SEO guide.
WordPress
Since version 5.5, WordPress exposes a native sitemap at /wp-sitemap.xml, which is disabled if Settings > Reading has the option to discourage search engines switched on. Plugins such as Yoast SEO replace it with /sitemap_index.xml: if the old one is still submitted in Search Console, you'll see "Couldn't fetch" or a 404. Remove the obsolete sitemap and submit the active one.
Next.js
In Next.js, app/sitemap.ts is a special route that is cached by default, so pages created after the build won't appear until you rebuild or make the route dynamic. With generateSitemaps, split sitemaps are served at paths such as /product/sitemap/1.xml, and an index file that gathers them has to be added separately. Another frequent mistake is building URLs from an environment variable that isn't set in production, leaving a sitemap full of localhost and "URL not allowed" errors.
When to resubmit your sitemap
You don't need to resubmit for every new article: Google rechecks successfully fetched sitemaps on its own schedule, and the ping endpoint has been retired. Resubmitting makes sense after fixing a fetch error, after a migration or domain change, or after structural changes such as splitting into several files. Deleting a sitemap from the report doesn't make Google forget its URLs; to stop crawling you need robots.txt or noindex.
If errors persist or the sitemap is just a symptom of a migration problem, we can run a technical check of your site: write to us through our contact page.
- sitemap xml
- google search console
- errori sitemap
- seo tecnico
- indicizzazione
- shopify
- wordpress
- next.js
Frequently asked questions
Why does Search Console say couldn't fetch when the sitemap opens in my browser?
Your browser isn't Googlebot. The file may be blocked by robots.txt, by a firewall or a CDN that challenges bots, or it was submitted on a domain different from the property. For newly submitted sitemaps the status sometimes stays that way for a few days even when the file is fine.
Does a sitemap get pages indexed faster?
It helps Google discover them, but it doesn't guarantee crawling or indexing. If sitemap pages stay excluded, look for the cause in the Page indexing report: quality, duplicates, canonicals or noindex.
Should I set priority and changefreq?
Not for Google: its documentation says these values are ignored. What counts is lastmod, as long as it reflects real content changes and isn't updated every time the file is generated.
Can I edit the sitemap on Shopify?
No. Shopify generates and updates sitemap.xml automatically as an index of sitemaps for products, collections, pages and blogs. You influence what appears by managing pages, visibility and redirects, and you need to submit a sitemap for each international domain.
Sources
- Manage your sitemaps using the Sitemaps report — Search Console Help
- Build and submit a sitemap — Google Search Central
- Sitemaps ping endpoint is going away — Google Search Central Blog
- Sitemaps XML format — sitemaps.org
- Finding and submitting your sitemap — Shopify Help Center
- New XML Sitemaps Functionality in WordPress 5.5 — Make WordPress Core
- sitemap.xml file convention — Next.js
Related articles
Technical SEO · 7 min read
Google Search Console for small businesses: setup and 6 reports to check monthly
How to verify your site in Search Console and which six reports to review each month to catch traffic drops, excluded pages and errors in time.
Technical SEO · 6 min read
Duplicate, Google chose a different canonical: why it happens and how to fix it
The Search Console status explained: why Google overrides your rel=canonical, which conflicting signals to check and how to fix variants, parameters and languages.
Technical SEO · 5 min read
Crawled – Currently Not Indexed: Real Causes and How to Fix Them
What the Search Console status Crawled - currently not indexed means, when it is normal, and how to diagnose thin or duplicate content, weak internal links and mass-generated pages.
