Sitemap.xml: what a sitemap is and how to submit it to Google

Learn who needs a sitemap.xml file, how it is structured, which pages to include and how to submit it through Search Console.

22Views

sitemap.xml: what a sitemap is and how to submit it to Google

sitemap.xml is an XML file containing a list of page URLs you want to appear in Google. A sitemap helps crawlers discover new and updated pages faster, especially on large websites or new domains with few incoming links. Remember that a sitemap is a hint, not an instruction. Google decides when and which URLs to crawl, and its documentation explicitly states that crawling every URL is not guaranteed.

Who needs a sitemap

According to Google documentation, small websites with up to around 500 pages may not need a sitemap if all sections are accessible through links from the homepage. The crawler can follow the menu and discover everything. However, creating a sitemap costs almost nothing and is useful in many cases:

  • an online store with thousands of product pages, some of which are accessible only through filters or pagination;
  • a new website with very few links from other websites;
  • a blog or news section where new pages appear daily;
  • a website that has moved to new URLs, where Google needs to discover the new structure faster;
  • pages with few internal links pointing to them.

Many content management systems and website builders generate sitemaps automatically. Check site.com/sitemap.xml: if it displays a list of links, the file already exists and you only need to check its contents.

XML and HTML sitemaps: what is the difference?

Some websites have a "Sitemap" page listing sections for visitors. This is an HTML sitemap designed for people, and it works as an additional navigation menu. An XML file is intended for crawlers and is not normally visible to visitors. One does not replace the other: an HTML sitemap is useful for large catalogs where finding the right section can be difficult, while an XML file is useful for almost any website that wants its pages indexed faster. A small brochure website only needs an XML file and a clear navigation menu.

How the file is structured

A sitemap consists of a root urlset tag and a series of url elements. Each element must contain a loc tag with the page URL. Other tags are optional. A simplified entry looks like this:

  • <url>
  • <loc>https://example.com/catalog/lampy/</loc>
  • <lastmod>2026-11-20</lastmod>
  • </url>

Rules from Google's documentation:

  • use only absolute URLs, including the protocol and domain. Relative paths such as /catalog/ are not valid;
  • use UTF-8 file encoding;
  • escape special characters in URLs, for example, an ampersand is written as &amp;;
  • Google ignores the priority and changefreq tags, so there is no need to spend time choosing their values;
  • Google uses lastmod only if the date consistently matches actual page updates.

A closer look at lastmod. The date should change when you update the main content, prices, structured data or links. If your CMS assigns today's date to every page each time it generates the sitemap, Google stops trusting it. Changing the year in the website footer is not a reason to update the date either.

Sitemap limits and multiple files

A single sitemap can contain up to 50,000 URLs or be up to 50 MB in size when uncompressed. If there are more pages, split the file into smaller sitemaps and combine them in a sitemap index file. Submit the index to Google instead of a dozen separate files.

Splitting sitemaps can also make sense for smaller websites. An online store can maintain separate sitemaps for categories, products and articles. Search Console then helps identify which group has problems. For example, articles may be indexed successfully, while Google has crawled half the product pages without indexing them. This helps you identify where to investigate.

Besides XML, Google accepts RSS or Atom feeds and plain text files with one URL per line. XML is more convenient for most websites because it supports modification dates and extensions for images and videos.

Which pages to include and which to exclude

Include only URLs you want to appear in search results. A good check is to make sure every URL in the file returns an HTTP 200 status code, is canonical and is not blocked from indexing.

Do not include:

  • redirected URLs. After a website migration, the sitemap should contain the new URLs;
  • deleted pages returning a 404 error;
  • pages with a noindex tag;
  • duplicate URLs with sorting parameters, UTM tags or filters with no search demand;
  • sections blocked in robots.txt;
  • shopping carts, customer account areas and login pages.

Including a page with a noindex tag sends conflicting signals to Google: "this page is important" and "do not show it". The crawler spends unnecessary time on the page, and additional warnings appear in reports.

How to submit a sitemap to Google

There are two main methods, and you can use both.

  1. Search Console. Open the Sitemaps report, enter your sitemap.xml URL and submit it. You need property owner permissions. Before submitting, Google recommends checking the sitemap URL with the URL Inspection tool to make sure the crawler can access it. Google fetches the file immediately after submission, but crawling the listed pages may take time.
  2. A line in robots.txt. Add a Sitemap directive containing the full sitemap URL to the file. You can include multiple directives. This method is suitable if you do not have owner access to Search Console.

Large websites can also submit sitemaps programmatically through the Search Console API. However, the old method of pinging Google through a dedicated URL no longer works. Google announced its retirement in 2023. If a plugin offers to "notify Google" in its settings, this has no effect on indexing.

After submission, a status appears in the report. A successful status means the file has been fetched and read. If Google finds errors, it will still process the URLs it was able to read. If Google cannot fetch the file, check whether it opens in your browser and whether crawler access is blocked. Remember that removing a sitemap from the report does not make Google forget the URLs it contained.

Common mistakes

  • sitemap.xml returns a 404 or 500 error after a CMS update.
  • The file contains HTTP URLs even though the website has been using HTTPS for some time.
  • Half the links point to redirects or deleted product pages.
  • Every page receives the same lastmod date each time the sitemap is generated.
  • A sitemap generator plugin creates the file once but never updates it, leaving new pages out.
  • The file contains test or administrative pages.

Once a month, open the Search Console report and compare the number of submitted and indexed pages. A large gap is a reason to investigate page quality and duplicate content.

How WID7 can help

If Google cannot find all your pages or sitemap errors are piling up in Search Console, order an SEO audit from UAH 3,500. We will check your sitemap, robots.txt, canonical URLs, redirects and indexing, then provide a clear list of fixes.

For ongoing search optimization, we offer SEO services from UAH 10,000/month. If you are planning a new website, contact us about website development. We build websites using our own WID CMS, with the domain and hosting registered in your name.

Rate this article

Other articles

loading