Skip to content

Chapter 3 · Technical SEO

XML Sitemaps

Publish an automatically maintained sitemap of preferred, indexable URLs, submit its location, and regularly check that the file remains accessible, valid, and accurate.

Updated October 31, 2026 · By · Reviewed by Robin Rad

· 9 min read

Quick answer: XML sitemaps are files that list a website’s preferred URLs and optional metadata, such as significant modification dates, to help search engines discover content. They are especially useful for large, new, or frequently updated sites. Submitting a sitemap does not guarantee that its URLs will be crawled, indexed, or ranked.

Key facts

TL;DR: Publish an automatically maintained sitemap of preferred, indexable URLs, submit its location, and regularly check that the file remains accessible, valid, and accurate.

XML sitemap
A machine-readable XML file listing URLs and optional metadata to help search engines discover content.
Sitemap index
An XML file that lists sitemap file locations so multiple sitemaps can be submitted together.
<loc>
The XML element containing a page’s absolute URL in a sitemap or a sitemap’s absolute URL in an index.
<lastmod>
An optional element describing a page’s latest significant modification, or a referenced sitemap file’s modification in an index.
A crawler approaches a central sitemap file branching to smaller files and webpage clusters.

What are XML sitemaps?

XML sitemaps are files that list a website’s preferred URLs. They can also include details such as the date of a major page update. These files help search engines find content. They do not tell search engines to index every page. Submitting a sitemap does not ensure crawling or indexing, as Google Search Central explains.

Think of a sitemap as a roadmap to URLs that search engines may need to find. It points to content but does not promise indexing or better rankings.

Search engines crawl, index, and rank in distinct steps. They fetch pages, assess content for their index, and choose which results to show for a search.

URL sitemaps and sitemap indexes

A URL sitemap lists page addresses. A sitemap index lists sitemap files so you can submit them together, as described by Google Search Central.

  • URL sitemap: Points to the content you want search engines to find.
  • Sitemap index: Points to the sitemap files that hold those URL lists.

Neither list has to show your site’s menu structure. A sitemap can list pages without showing how visitors move between them.

When does a sitemap matter most?

XML sitemaps matter most when search engines need help finding new or updated content. They are useful for large sites, new sites with few external links, and sites where content changes often. Search engines may find all the pages on a small site through clear, thorough navigation alone.

The value depends on how easily search engines can find your pages:

  • Large sites: A sitemap lists preferred URLs across a large catalogue or archive. It can help expose pages that might be hard to find.
  • New sites: Few external links can leave search engines with fewer paths to your content. A sitemap offers another route.
  • Frequently changing sites: An up-to-date sitemap helps search engines find new pages and learn about major updates.

A small, well-linked site can still benefit from a sitemap as a discovery aid. It does not ensure crawling or indexing, as Google Search Central explains.

Sitemaps support rather than replace crawlable internal links.

Crawlability and crawl budget deal with whether search engines can access pages and how they spend their crawl resources. A sitemap alone does not solve those issues.

Choose the URLs your sitemap should contain

Choose public, working pages that you want search engines to index.

  1. Include useful content. List blog posts, product pages, articles, and key landing pages that you want indexed. These are examples, not a complete list. Do not set a page-count cap that leaves useful content out just to list “important pages only.”
  2. Choose preferred versions. Include preferred canonical URLs rather than duplicate versions of the same content. This follows Google Search Central’s guidance.
  3. Leave out excluded content. Exclude URLs marked noindex. Use indexability and noindex checks to review unclear cases. Keep admin pages, private content, and unwanted internal-search URLs out too.
  4. Remove stale entries. Replace redirected or broken entries with working destination URLs where appropriate. Follow the guidance on redirects and broken links.
  5. Keep URL versions consistent. Use the site’s preferred protocol and hostname throughout. If HTTPS is the preferred version, list HTTPS URLs. Use the preferred www or non-www hostname too. Editing a sitemap alone does not move a site to HTTPS.

These steps keep the sitemap in line with your chosen pages. They are good maintenance, not proof that every unwanted entry causes a penalty.

Build valid XML and keep it updated

Valid sitemap XML gives crawlers a URL list they can read. Automatic updates keep that list in line with your published content.

Generate valid XML

A sitemap generator builds the file from your site’s content. Use your CMS’s built-in sitemap or a tool that receives ongoing support. WordPress, Yoast SEO, and Rank Math are examples to consider. Google Search Console accepts and reports on existing sitemaps; it does not create them.

Use UTF-8 encoding and full, absolute URLs, including the protocol and hostname. Escape special characters in XML tag values, as required by Google’s sitemap guidance. For example, write an ampersand as &amp;.

<urlset xmlns=”http://www.sitemaps.org/schemas/sitemap/0.9″><url><loc>https://example.com/page/</loc></url></urlset>

Keep dates and URLs accurate

The optional <lastmod> field records the date of a significant page update. Google uses it when the dates are accurate over time and can be checked, according to Google’s guidance.

  1. Do not change the date just because you rebuild the file, deploy the site, or update a copyright date. Leave it out when you lack accurate data.
  2. Keep page update dates separate from a sitemap index’s update dates. The dates in an index refer to sitemap files.
  3. Set up automatic additions, removals, and date updates as your published pages change.

Content freshness means meaningful content updates, not just new timestamps.

If you add hreflang through a sitemap, create a separate <url> entry for each localized URL. Each entry needs <xhtml:link> annotations for every alternate version, including itself. Follow Google’s implementation guide.

Split large sitemaps and create an index

Split large XML sitemaps to keep each file within the limits. Then use a sitemap index to list those files.

Keep both limits in view

A URL sitemap must not exceed 50,000 URLs or 50 MB uncompressed. Split it if it exceeds either limit, as required by Google Search Central. Gzip compression makes the file smaller for transfer. It does not change the uncompressed size used for this limit.

You can group files by content type or site area, such as products and blog posts. This can make maintenance and reports easier to manage. Smaller files do not, by themselves, improve crawling.

Create the index

An index can contain up to 50,000 <loc> entries that point to sitemap files, according to Google Search Central. This is a separate limit from the page URL limit within each sitemap.

Use UTF-8, absolute URLs, and XML entity escaping where needed, following Google Search Central’s guidance. A complete minimal index is:

<sitemapindex xmlns=”http://www.sitemaps.org/schemas/sitemap/0.9″><sitemap><loc>https://example.com/sitemap-pages.xml</loc></sitemap></sitemapindex>

Replace the example URL with the full URL of your sitemap file. Add a separate <sitemap> element with its own <loc> for each additional file. Keep all entries inside the <sitemapindex> element.

How do you submit an XML sitemap?

Publish your sitemap or sitemap index at a URL that search engines can access. Then open your site’s verified property in Google Search Console and enter the file’s location in the Sitemaps report. Check the result to see whether Google could fetch and process it.

  1. Publish the file. Make it available without a login. Search Console does not create it.
  2. Select the property. Use the verified property for the site whose URLs the sitemap lists.
  3. Submit its location. Enter the sitemap or index location in the Sitemaps report.
  4. Check processing. Review the result. Look into any reported fetch or XML parsing errors.

The Search Console API is also an option for automatic submission, according to Google Search Central.

You can also list the file in robots.txt with this directive: Sitemap: https://example.com/sitemap.xml.

You can submit the sitemap to Bing through Bing Webmaster Tools too.

Routine content changes should update the existing file automatically. You do not need to resubmit it by hand for each change. Check later processing results and fix errors.

Google’s unauthenticated sitemap ping endpoint is retired and returns HTTP 404, as documented by Google Search Central. Do not use ping URLs.

Avoid sitemap settings that create false confidence

Some sitemap settings and habits can give a false sense of control over crawling and indexing. Keep these limits in mind:

  1. Skip priority tuning for Google. Google ignores <priority> and <changefreq>, as explained by Google Search Central. Do not assign scores to your homepage or landing pages in an effort to influence crawling or rankings.
  2. Keep modification dates honest. Google uses <lastmod> when it is accurate over time and reflects significant page updates, according to Google Search Central. Do not give every URL a fresh date whenever you generate the file. This makes unchanged pages look updated and the dates less reliable.
  3. Match the live site. Manual exports can become stale. Check generator filters for unwanted URLs and missing pages. Treat mismatches as maintenance issues, not automatic penalties.
  4. Separate processing from indexing. Successful sitemap processing does not prove that all listed pages are indexed. Sitemaps aid discovery but do not ensure crawling or indexing, as Google Search Central explains. Submitting the file again and again does not force indexing.
  5. Use proper removal controls. Deleting a URL from a sitemap does not remove it from search. The guide to indexability and noindex covers controls for excluding pages.

Check accessibility, validity, and URL coverage

Check that search engines can fetch and read your sitemap. It should be up to date and cover the pages you intend to list.

Sitemap verification checklist

Use these checks to find file access problems, XML errors, and gaps in your URL list.

  1. Fetch the file. Confirm that it is available without a login. Look into access problems promptly.
  2. Inspect the response. Confirm that it contains XML, not an error or login page.
  3. Validate structure. Check XML syntax, UTF-8 encoding, absolute URLs, and XML entity escaping. These are required by Google’s sitemap guidance.
  4. Check size. Each sitemap must stay within 50,000 URLs and 50 MB uncompressed, per Google’s limits.
  5. Inspect listed URLs. Compare the generated list with the published pages you want it to include. Look for missing pages, stale entries, and wrong update dates. A crawler such as Screaming Frog SEO Spider can help check URLs during a technical SEO audit.

Submit the file through the Sitemaps report, as described by Google. In Google Search Console, check its processing status, last read, and reported discovery counts. Use indexability checks to look into issues with individual pages.

Repeat these checks after changes to your templates, CMS, or sitemap generator. Also check after major changes to your published pages. Monitor Search Console or Bing Webmaster Tools at a pace that suits your publishing schedule.

Judge sitemap health by whether the file is accessible, valid, current, and complete for your chosen URLs. Do not judge it by an indexed-page percentage. Submission does not ensure crawling or indexing, as Google explains.

Frequently asked questions

What is the difference between an XML sitemap and an HTML sitemap?

An XML sitemap is a file that helps search engines find site URLs and related details. An HTML sitemap is a web page that helps people browse links to your content. They serve different audiences. An XML sitemap supports discovery and crawling, but listing a page does not ensure indexing, as explained by Google Search Central.

Can I create an XML sitemap for free?

You can create an XML sitemap without buying software. Write it by hand or use a free sitemap feature if your site platform offers one. Manual creation suits small sites that rarely change. Automation helps when content changes often. Follow the file rules in Google’s sitemap guide, and check that the URLs stay accurate.

Does an XML sitemap have to be named sitemap.xml?

An XML sitemap needs a valid format, not the specific filename sitemap.xml. That name is common, but you can use another clear filename. Make its actual location easy to find. Submit it through Search Console or list it in robots.txt, as described by Google Search Central. Update those references if you rename or move it.

What should I do if multiple WordPress plugins generate sitemaps?

Different sitemap tools may publish competing lists of your site’s URLs. Choose a main generator and turn off sitemap output in the others. You do not need to remove plugins you still use for other tasks. Check that your chosen sitemap covers your preferred URLs. Then update Search Console submissions and any robots.txt sitemap references to point to the files you plan to maintain.

Sources

  1. Learn about sitemaps
  2. Manage your sitemaps with a sitemap index file
  3. Build and submit a sitemap
  4. Tell Google about localized versions of your page
  5. Sitemaps ping endpoint is going away

About the author: writes the Deep SEO SEO Encyclopedia, a 2026 reference on technical, on-page, local and AI search. Every entry cites the sources linked in its text and is reviewed by Robin Rad before publication.

Back to top
WhatsApp +968 9182 2962