Skip to content

This guide answers: xml sitemaps: what to include, size limits and how to submit them

XML sitemaps: what to include, size limits and how to submit them

Learn what an XML sitemap should list, the 50,000 URL and 50 MB limits, and how to submit it via Google Search Console, Bing Webmaster Tools and robots.txt.

By Hannah Wells, Technical SEO, site performance and online stores
· 7 min read

updated 

XML sitemaps: what to include, size limits and how to submit them
FIG. 01 Photo Innovalabs / Pixabay

Short answer

An XML sitemap is a machine-readable file that lists the pages of a site you want crawlers to find. A single file can hold up to 50,000 URLs or 50 MB uncompressed, whichever limit is hit first. It should list only canonical, indexable pages that return HTTP 200. You can submit it through Google Search Console, through Bing Webmaster Tools, and by adding one line to robots.txt.

Key points

  1. A sitemap is a plain file that names the URLs of a site.
  2. The limits are simple to remember. A single sitemap file can contain at most 50 MB uncompressed or 50,000 URLs.
  3. Think of the sitemap as a list of the pages you actually want indexed.
  4. The exclusion list is just as important as the inclusion list.

What is an XML sitemap

A sitemap is a plain file that names the URLs of a site. Search engines read it the way a person reads a table of contents. It tells crawlers which pages exist, so they can discover and index them without relying only on links.

The file is built for machines, not visitors. It has no design and nothing to read for pleasure. Its job is narrow: hand crawlers a clean list of the pages you want found.

A sitemap is not a ranking element. Listing a page helps a crawler discover it. It does not push that page higher in results. This is a common myth, and it explains why the content of the file matters more than its size. A sitemap full of weak or broken URLs is just a bad list. A tidy one is a useful list.

Site owners who look for this topic usually want a short, exact reference: what the limits are, what goes in, what stays out, and where to send the file. The sections below follow that order. How to generate the file with a plugin, a script or a CMS is a separate subject and is not covered here.

Size limits and structure

The limits are simple to remember. A single sitemap file can contain at most 50 MB uncompressed or 50,000 URLs. Hit either ceiling and the file is full. The two limits apply together, so a file with fewer URLs can still be too large if each entry carries a lot of data.

When you need a sitemap index

Large sites outgrow one file. The answer is a sitemap index: a file that does not list pages itself but points to other sitemaps. Each entry in the index is a <loc> tag that holds the address of one sub-sitemap.

The index has its own limits. It can hold up to 50,000 <loc> entries, and the index file itself is capped at 50 MB. A single property can have at most 500 index files.

The structure is easy to picture. The index sits at the top and names each sub-sitemap. Each sub-sitemap lists page URLs, within its own limit of 50,000 URLs or 50 MB. A site with a few hundred pages never needs this. A large catalogue or a big archive might.

Staying under the limits

Sitting well below the limits is not a problem. There is no penalty for a small sitemap. The only thing lost is the chance to list more pages if the site is big enough to have them. A site with a modest number of URLs can keep one file and leave it there.

What to include in your XML sitemap

Think of the sitemap as a list of the pages you actually want indexed. That gives a clear test for each URL: is it the canonical version, does it return HTTP 200, and is it indexable?

Canonical pages only. If several URLs show the same content, list the canonical one and leave the variants out. Non-canonical versions stay outside the file.

Pages that return 200 OK. The sitemap should point to live pages that load normally. A page that answers with something else does not belong in the list.

Indexable pages. If a page carries a noindex tag, it is telling search engines to keep it out of the index. Listing it in the sitemap sends the opposite message.

In practice, the pages that usually belong in the file are the main ones: the home page, service pages, product pages, collections or categories, blog posts, and the main static pages. Together they form the public face of the site.

The lastmod tag

Only <loc> is required. The <lastmod> tag is recommended, but search engines make use of it only when it is accurate. If you cannot give a true date for a page, omit the tag. An invented date is worse than no date, because it makes the whole field less trustworthy.

Tags to leave alone

Google and Bing ignore <changefreq> and <priority>. You can leave both out without losing anything. Spending time tuning them has no effect on how those engines read the file.

What NOT to include

The exclusion list is just as important as the inclusion list. A sitemap should not mix useful pages with URLs that lead nowhere or that you do not want indexed. The following stay out:

  • Pages with a noindex tag.
  • Redirects, whether 301, 302 or another type. A redirect does not return 200, so the final destination is the page to list.
  • Pages that return HTTP 404.
  • URLs with tracking parameters. Do not list every variant of the same page.
  • Cart, checkout and user account pages.
  • Admin pages and anything behind a login.
  • Internal search result pages.
  • Paginated pages beyond page 2.
  • Duplicate or thin content.

The logic behind the list is consistent. Each excluded item is either not a real destination (redirects, 404s), not meant for the public index (admin, login, cart, checkout, accounts), or a near copy of something already listed (tracking variants, deep pagination, duplicates). A sitemap works best when every line earns its place.

How to submit your sitemap

There are three ways to tell search engines where the file is. They coexist, and using one does not rule out the others.

Google Search Console

In Google Search Console, go to Indexing, then Sitemaps. Add the URL of your sitemap, or the URL of your sitemap_index.xml if the site uses an index. The sitemap then appears in the list for that property.

Bing Webmaster Tools

Bing Webmaster Tools has its own Sitemaps section. The idea is the same: give the address of the file for the site you manage.

robots.txt

You can also add a single line to your robots.txt file:

Sitemap: https://example.com/sitemap.xml

If the site uses an index, point to it instead:

Sitemap: https://example.com/sitemap_index.xml

This line lets Google, Bing and AI crawlers find the file on their own, with no account needed. Because the methods do not conflict, many site owners use the console tools and the robots.txt line together.

The submission steps in order

For a site owner starting from a finished file, the sequence is short:

  • Check that every URL in the file is canonical, returns 200 and is indexable.
  • Remove redirects, 404s, noindex pages, tracking variants, cart and account pages, admin and login pages, internal search results, deep pagination, and duplicate or thin content.
  • Split the file with a sitemap index if it exceeds 50 MB or 50,000 URLs.
  • Add the Sitemap line to robots.txt.
  • Submit the file in Google Search Console and in Bing Webmaster Tools.

Common mistakes to avoid

Most problems with sitemaps come from the same few habits.

Leaving out canonical pages. The file is supposed to list the pages you want indexed, so missing the main ones defeats the purpose.

Including redirects or 404s. These URLs do not return 200, so they should not be there. List the final live address instead.

Listing paginated pages beyond page 2. Deep pagination adds length without adding value.

Inventing <lastmod> dates. A date that does not match reality weakens the field. If you do not know the date, leave the tag out.

Worrying about a small file. Staying under the size limits is fine. The only thing lost is a chance to list more pages, and that matters only for a site large enough to have them.

What site owners look for in a sitemap reference

People who search this topic tend to want the same things: exact numbers, a clear list of what to leave out, and the right place to submit. Many arrive with a working site and a list of URLs that mixes good pages with old redirects and test pages. They value a reference that lets them check each line against a rule, rather than a long theory of crawling.

The coverage here is global in practice. The sitemap format and the submission tools are the same for any site, so the guidance applies wherever the site is hosted and whatever language it uses. It is a technical reference, not a service. No client reviews or case studies are quoted, and none are needed to state the rules above.

Sources consulted on 03/12/2026:

  • SEO-Day, wiki page on XML sitemap size limits
  • Pyalm, XML sitemap guide
  • Ignited Nepal, XML sitemap best practices

Read next in Technical SEO

seo-service-journal technical-seo

How Google crawls a website: crawl budget, crawl rate and what slows it down

· 8 min read

seo-service-journal technical-seo

Indexing explained: why a page is crawled but not indexed

· 8 min read

seo-service-journal technical-seo

Robots.txt: syntax, common mistakes and how to test it

· 6 min read

Free newsletter · every Monday

The Monday Crawl

One email each Monday: what changed in the official search documentation, and what to check on your own site.

Free. One click to unsubscribe. We use your email only to send the newsletter. Privacy policy.