What Is an XML Sitemap? A Complete Guide to Format, Benefits, and Submission
An XML Sitemap is a fundamental SEO configuration that helps Google discover and crawl important pages more efficiently. This article explains the format, how to generate one, submission steps, and common errors, plus what to check if pages still aren't indexed after submission.
Your website has been live for a while, but new articles still haven't been discovered by Google. After a site redesign, you've added many new pages, yet Search Console still shows no crawl activity. Or your site has hundreds or thousands of product and content pages, making it hard to confirm whether search engines have found them all. When facing these issues, besides checking internal links, robots.txt, and whether pages allow indexing, an "XML Sitemap" is also a crucial basic setup.
An XML Sitemap consolidates the important URLs you want search engines to discover, along with metadata like last modification times. Today, we'll explain what an XML Sitemap is, its benefits, common formats, and how to check and submit it to Google after generation.
1. What Is an XML Sitemap?
Think of an XML Sitemap as a list of URLs on your site specifically formatted for search engines. Regular visitors won't typically open it, but search engines like Google and Bing can use it to quickly understand which pages are important and whether any have been recently updated.
A typical Sitemap URL looks like:
https://www.example.com/sitemap.xmlSome sites use:
https://www.example.com/sitemap_index.xmlWhen you open it, you won't see a regular webpage but XML data. For example:
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>https://www.example.com/</loc>
<lastmod>2026-09-01</lastmod>
</url>
<url>
<loc>https://www.example.com/blog/xml-sitemap</loc>
<lastmod>2026-09-03</lastmod>
</url>
</urlset>The common tags are straightforward:
<urlset>: The root element of the Sitemap;
<url>: Represents a single URL;
<loc>: The full URL of the page;
<lastmod>: The date of the last significant modification.
According to the Sitemap protocol, XML files must use UTF-8 encoding, and <urlset>, <url>, and <loc> form the basic URL Sitemap structure.
Older tutorials often include:
<changefreq>daily</changefreq>
<priority>1.0</priority>But for modern Google SEO, there's no need to spend much effort on these tags.
Google currently states that it ignores <priority> and <changefreq> in Sitemaps. In contrast, if <lastmod> is consistently accurate, Google may use it to determine if a page has had significant updates.
So don't set all pages to:
<priority>1.0</priority>or automatically update the Sitemap date daily just to "make Google crawl more often."
Such tactics have limited practical value now.
2. What Does an XML Sitemap Do for Your Website?
The primary value of an XML Sitemap isn't to "boost keyword rankings" but to help search engines discover and understand the important URLs on your site. Google's definition aligns: it provides information about pages, videos, images, and other files, plus the relationships between them, helping search engines crawl more efficiently. In practice, it addresses several issues:
1. Helps Google Discover New Pages
For example, a recently launched website:
Homepage
├── Product Pages
├── About Us
├── Blog
│ ├── Article A
│ ├── Article B
│ └── Article CIf your internal linking is solid, Googlebot can discover these pages by following links. But if the site is very new, has few backlinks, or some new pages are buried deep in the site structure, search engines may take much longer to find them.
Listing these important URLs in a Sitemap gives search engines an extra page list. Google specifically notes that large sites, new sites, and sites with lots of images, videos, or news content benefit most from Sitemaps.
2. Helps Manage Large Websites
If your site has only a few dozen pages, maintenance is simple. But e-commerce, news, forums, or large content sites may have hundreds of thousands or even millions of URLs. Relying solely on site navigation makes it hard to quickly verify whether all important pages have been discovered. With a Sitemap, you can split by content type:
sitemap_index.xml
│
├── post-sitemap.xml
├── page-sitemap.xml
├── product-sitemap.xml
├── category-sitemap.xml
└── image-sitemap.xmlThis not only makes maintenance easier but also simplifies troubleshooting in Search Console.
3. Provides Page Update Times
For instance, an article originally published on 2026-01-10, then significantly updated with new content, data, and links on 2026-09-04, you can update <lastmod>2026-09-04</lastmod>. But note: lastmod should reflect real, significant modification times.
Substantive edits like content updates, structured data changes, or important link changes count. Simply changing the copyright year in the footer from 2025 to 2026 doesn't warrant updating lastmod for all pages. This aligns with Google's current guidance on this tag.
3. Common XML Sitemap Formats
There isn't just one type of sitemap, but XML Sitemap is the most common for webmasters.
1. Standard XML Sitemap
This is the most common type:
https://example.com/sitemap.xmlIt lists your site's pages.
For example:
<url>
<loc>https://example.com/product/a</loc>
<lastmod>2026-08-28</lastmod>
</url>XML Sitemaps are extensible; beyond standard URLs, they can include image, video, news, and multilingual page information.
2. Sitemap Index
As sites grow, you typically won't cram all URLs into one file. Instead, use a Sitemap Index to manage multiple child Sitemaps.
For example:
<?xml version="1.0" encoding="UTF-8"?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<sitemap>
<loc>https://example.com/post-sitemap.xml</loc>
</sitemap>
<sitemap>
<loc>https://example.com/product-sitemap.xml</loc>
</sitemap>
<sitemap>
<loc>https://example.com/page-sitemap.xml</loc>
</sitemap>
</sitemapindex>Google and the Sitemap protocol currently specify that a single Sitemap can contain at most 50,000 URLs and must not exceed 50MB uncompressed. If you exceed either limit, split into multiple Sitemaps.
For example, an e-commerce site with 120,000 product URLs could split into:
product-sitemap-1.xml
product-sitemap-2.xml
product-sitemap-3.xmlThen manage them via:
sitemap_index.xml3. Image, Video, and News Sitemaps
If your site heavily relies on:
Product images;
Original images;
Video content;
Google News;
You can add corresponding extensions to your Sitemap.
However, for typical business sites or blogs, there's no need to make Sitemaps overly complex from the start. Managing core page URLs well is more important.
4. Which URLs Should Be in Your Sitemap?
This step is actually more important than "which tool to generate the Sitemap." A simple rule: Only include canonical URLs that you genuinely want to appear in search results.
For example:
https://example.com/
https://example.com/product/
https://example.com/product/a
https://example.com/blog/xml-sitemapThese are normal, important pages and can be included.
URLs you typically shouldn't add in bulk:
404 pages
Admin login URLs
Test pages
Duplicate pages
noindex pages
301/302 redirect URLs
Search result pages
URLs with excessive tracking parameters
Non-canonical URLsSuppose the same product is accessible via two URLs:
https://example.com/product?id=1001and:
https://example.com/product/1001If your site uses canonical to specify:
https://example.com/product/1001as the preferred version, your Sitemap should also list only the canonical URL.
Google's current advice is to prioritize canonical URLs you want indexed in your Sitemap.
Otherwise, you might have:
Canonical says A is the main page
Sitemap keeps submitting BThis sends conflicting signals to search engines.
5. How to Generate an XML Sitemap
If your site doesn't have too many pages, you don't need to manually list URLs or install a plugin just for Sitemap generation. The easiest way is to use Chahu's XML Sitemap Generator, which crawls from your site's entry point, compiles important pages, and generates a standard sitemap.xml.
How to Use:
Open the Chahu XML Sitemap Generator, enter your homepage URL, for example:
https://www.example.com/Then set crawl parameters based on your site: maximum number of URLs to crawl, crawl depth, and whether to keep URL query parameters. Start crawling when ready. Chahu will traverse internal HTML links from the entry point, limited to same-site pages, excluding external links. This is far more convenient than manual listing, especially when you have dozens of articles, product pages, or category pages—no need to copy URLs one by one, and you reduce the risk of missing important pages.
6. What to Do After Generating the Sitemap
The goal isn't just to maximize URL count. Your Sitemap should contain the important pages you want search engines to discover, not every link that appears on your pages. So after generating, don't rush to submit it to Google Search Console. First, verify the file is accessible to avoid issues like incorrect paths, HTTPS, server, or CDN configurations that prevent search engines from reading it.
1. Verify the Sitemap URL
After generation, open the Sitemap URL directly, e.g.:
https://www.example.com/sitemap.xmlYou should see XML content, not a redirect to a 404 page, homepage, login page, verification page, or CDN block page.
If it doesn't open, confirm that sitemap.xml is actually uploaded to the correct directory and that your site's routing isn't redirecting this URL elsewhere.
2. Check HTTP Status Codes
The ideal status is: 200 OK
If it returns 301 or 302, search engines can still follow redirects, but there's no need to add that extra layer.
More importantly, watch for:
403
404
500
502
503
504A 404 usually means the file doesn't exist or the path is wrong. 403 often indicates server permissions, CDN, WAF, or bot protection rules. 5xx errors typically require checking the server or upstream proxy.
3. Use Chahu to Check Actual Access
To confirm the Sitemap is accessible publicly, use Chahu to run an HTTP or HTTPS check on the Sitemap URL.
For example, test: https://www.example.com/sitemap.xml
Focus on:
Whether the URL opens correctly;
Whether the HTTP status is 200;
Whether HTTPS connections have issues;
Whether response times are normal;
Whether there are timeouts;
Whether results are consistent across different network nodes.
This is especially useful for sites behind CDNs or with multiple nodes.
Sometimes the Sitemap opens fine on your local machine, but certain regional nodes return 403, timeouts, or other errors. Checking only in a local browser can easily miss these issues.
4. Check robots.txt for Crawl Blocks
Besides the Sitemap file, also check:
https://www.example.com/robots.txtto ensure no rules accidentally block important directories or the entire site.
If needed, declare the Sitemap in robots.txt:
Sitemap: https://www.example.com/sitemap.xmlThis way, search engines can find the Sitemap when they read robots.txt.
After these checks, submitting to Google Search Console is more reliable.
In short, follow this order:
Generate XML Sitemap
↓
Verify Sitemap URL
↓
Check HTTP Status Codes
↓
Check HTTPS and Server Access
↓
Check robots.txt
↓
Submit to Google Search ConsoleResolve access issues first, then move to submission and indexing. This makes it easier to diagnose problems like "Couldn't fetch" or "Read failed" later.
7. How to Submit an XML Sitemap to Google
Once the Sitemap is accessible, you can officially tell Google where it is. There are two common methods:
Method 1: Submit via Google Search Console
Go to your property, then find:
Google Search Console
↓
Sitemaps
↓
Add a new sitemapEnter:
sitemap.xmlor:
sitemap_index.xmland submit.
Submitting via Search Console also lets you see if Googlebot has accessed the Sitemap and whether Google found any errors.
For larger sites, you can submit multiple Sitemaps to monitor discovery and crawling for different page types.
For example:
/post-sitemap.xml
/product-sitemap.xml
/page-sitemap.xmlThis way, if product pages have issues, you don't have to sift through hundreds of thousands of URLs.
Method 2: Declare Sitemap in robots.txt
You can also add to your site's:
https://example.com/robots.txtthe following:
User-agent: *
Allow: /
Sitemap: https://example.com/sitemap.xmlIf using a Sitemap Index, write:
Sitemap: https://example.com/sitemap_index.xmlGoogle will discover the Sitemap when it crawls robots.txt.
Make sure to use the full absolute URL, not just:
Sitemap: /sitemap.xmlThe safer format is:
Sitemap: https://example.com/sitemap.xmlIf you've recently modified robots.txt, you can use Chahu's robots.txt checker to re-read the live rules and confirm the Sitemap URL is correct and that important directories aren't accidentally disallowed.
8. Why Does Sitemap Submission Fail?
If Search Console shows "Couldn't fetch," don't repeatedly delete and resubmit. First, diagnose the specific issue:
1. Sitemap Returns 404
For example, you submitted:
https://example.com/sitemap.xmlbut opening it shows:
404 Not FoundThis usually means:
The Sitemap wasn't generated;
The URL is incorrect;
The file was moved;
The CMS changed the Sitemap path.
Find the actual file location and resubmit.
2. Returns 403 Forbidden
If regular pages load fine but the Sitemap returns:
403Check: CDN access rules, WAF, bot protection, IP restrictions, and web server rules. Be careful not to block legitimate search engines with overly strict anti-scraping settings.
3. Returns 5xx Errors
For example:
500
502
503
504These usually point to server, reverse proxy, CDN, or backend application issues.
If it's intermittent, test from multiple regions to see if certain routes or nodes are problematic.
4. XML Format Errors
XML is strict about formatting.
For example, if a URL contains &, it must be properly escaped, or the XML may fail to parse.
Per the Sitemap protocol, data values in XML must be correctly entity-escaped.
5. Sitemap Contains Many Invalid URLs
Sometimes Search Console shows the Sitemap is readable, but it contains many:
404
301
noindex
Duplicate pages
Non-canonical pagesEven if such a Sitemap is "successful," its quality is questionable.
So when troubleshooting, don't just ask: Can Google read it?
Also ask: After reading, does it provide a set of pages truly worth indexing?
9. Why Aren't Pages Indexed After Sitemap Submission?
This is the most misunderstood aspect. Many webmasters see "Sitemap: Success" in Search Console and assume all pages will soon appear on Google.
That's not the case. A Sitemap mainly tells Google that URLs exist.
But from "discovery" to indexing, many factors come into play:
URL Discovery
↓
Crawlability
↓
HTTP Status
↓
robots.txt
↓
noindex
↓
Canonical
↓
Content Quality & Duplication
↓
Internal Links
↓
Page Quality
↓
IndexingSo if a page isn't indexed for a long time, don't resubmit the Sitemap daily.
Instead, check:
Does the page return 200?
Is it blocked by robots.txt?
Is there a noindex tag?
Does canonical point to another page?
Is the content duplicated?
Are there proper internal links?
Does the page offer real, unique value?
Google explicitly states that submitting a Sitemap is just a hint; it doesn't guarantee that Google will download, crawl, or index the pages. That's why: A successful Sitemap submission only means this step is fine; it doesn't mean the entire SEO indexing process is complete.
XML Sitemaps aren't a complex SEO technique. For most sites, what you really need to do is simple: include the important canonical URLs you want indexed, keep lastmod as accurate as possible, ensure the Sitemap is consistently accessible, and then tell search engines where it is via Google Search Console or robots.txt.
If your Sitemap is submitted but Google keeps failing to fetch it, or pages aren't being discovered, don't just keep tweaking the XML file. Continue checking HTTP status, HTTPS, robots.txt, canonical tags, internal links, and CDN/server access—these often reveal the real issues affecting crawl and index. The value of a Sitemap isn't to force search engines to index a page; it's to minimize obstacles that prevent search engines from discovering important content. Getting that right is where a sitemap truly helps your SEO.
FAQ
Q1: Does an XML Sitemap directly help with Google SEO rankings?
A: To be clear, submitting a Sitemap does not directly boost your page's keyword rankings. Its purpose is to give Googlebot a "roadmap" of your site's pages, which are the main pages, and when they were updated. It improves crawl and indexing efficiency, especially for new sites, large sites, or deeply nested pages. Only after Google discovers and indexes your pages can rankings come into play.
Q2: If my site has few pages, do I still need an XML Sitemap?
A: If your site has only a few dozen pages and your navigation and internal links are clear, Googlebot can likely crawl the entire site by following links. In that case, a Sitemap isn't strictly necessary. However, it's highly recommended because creating and submitting one is low-cost and lets you monitor its status in Google Search Console (GSC). It's a beneficial basic setup.
Q3: Is the <lastmod> tag important? Should I update it daily?
A: Google does consider <lastmod> (last modification time), but only if it's accurate. If you only change the footer copyright year or update the date daily without real changes, Googlebot will quickly notice the inaccuracy and may ignore your modification times. Only update this tag when the page's content, data, or core structure undergoes substantive changes.
Q4: What if my site has too many pages for one Sitemap?
A: According to Google and the Sitemap protocol, a single XML Sitemap can contain at most 50,000 URLs and must not exceed 50MB uncompressed. If your site (e.g., a large e-commerce or news site) exceeds this, split into multiple child Sitemaps (e.g., product-sitemap-1.xml, product-sitemap-2.xml) and use a Sitemap Index file to list them all. Then submit that index file to Google.



