Not sure whether search engines can find all your pages? The core xml sitemap best practices are simple: build a valid file, stay within the size limits, submit it in Search Console, and check its status regularly.
This guide sits inside our collection of seo tips, where sitemaps are one piece of technical SEO.
| Item | Value |
|---|---|
| Maximum URLs per sitemap file | 50,000 URLs |
| Maximum uncompressed file size | 50MiB |
| Length of each URL in the file | Shorter than 2,048 characters |
| File encoding | UTF-8 |
| Site size where a sitemap is probably optional | About 500 pages or fewer, with every page reachable by links |
| Priority and changefreq tags | Ignored by Google |
These figures come from Wikipedia’s Sitemaps article and Google’s Sitemaps report help page. They can change, so check the sources before you rely on them.
Do you need an XML sitemap at all?
A sitemap is a file on your site that tells Google which pages it should know about, as described in Google’s Sitemaps report help. Wikipedia adds that the protocol lets search engines crawl a site more efficiently and find URLs that may be isolated from the rest of its content.
The same Google help page calls a small site one with about 500 pages or fewer, and says such a site probably needs no sitemap if every page can be reached by following links from the homepage. If you use a hosting service such as Squarespace or Wix, it probably manages the sitemap for you, so you don’t need to make your own.
Google introduced sitemaps in June 2005, according to Wikipedia’s history of the protocol. A bigger or poorly linked site is where the rest of this guide matters most.
Choose a format and build the file
Google says XML sitemaps are the most versatile of the supported formats, because they are extensible and can carry extra data about images, video, news content and localized versions of your pages, as its build and submit a sitemap guide explains. The same guide says Google has no preference between formats, so choose the one that suits your setup.
The trade-offs listed in that guide are worth weighing:
- Strength: it can provide the most information about your URLs.
- Strength: most content management systems generate sitemaps automatically, or offer plenty of sitemap plugins.
- Drawback: it can be cumbersome to work with.
- Drawback: mapping can be complex to maintain on larger sites, or on sites where URLs change often.
A sitemap can also be a plain text list of URLs, as Wikipedia notes.
Syntax and size rules to follow
According to Wikipedia, the file must be UTF-8 encoded, and cannot be more than 50MiB uncompressed or contain more than 50,000 URLs. Each loc entry provides the full URL including the protocol, and that value must be shorter than 2,048 characters.
When a list outgrows those limits, Wikipedia says to break it into several sitemaps and point to them with a sitemap index file, which is a file that points to multiple sitemaps.

Run through this checklist before you publish:
- Check the URL total and the file size against the caps.
- Save the file in UTF-8.
- Write every address in full, starting with http or https.
- Split oversized lists and tie the parts together with an index file.
Which tags to use and which to skip
Beyond the required elements, lastmod is optional. Wikipedia says it can show the full date and time, or simply a date in the format YYYY-MM-DD, and that support for optional elements can vary from one search engine to another.
The same article states that Google ignores the priority and changefreq values. It also describes changefreq as only a guide for crawlers, not something used to determine how frequently pages are indexed.
How to submit and test your sitemap
Submitting a sitemap means telling Google where to find the file, because you cannot upload it directly, as Google’s Sitemaps report help explains. The same page gives these steps:
- Post the sitemap on your site in an acceptable format, and follow the guidelines for syntax and file location. Google recommends the site root.
- Use an XML sitemap generator to create the file and test it for syntax errors.
- Make sure Googlebot can reach it with no login in the way. A live URL inspection should show Page fetch as “Successful”.
- Paste the tested URL into the Add a new sitemap box in the Sitemaps report and click Submit.
Google tries to crawl a sitemap as soon as you submit it, per the same help page. Submitting through the report needs owner permissions on the property. Without them, you can list the sitemap in your robots.txt file instead.
The Search Console Sitemaps API offers the same functionality as the report, according to that page.
Monitoring and maintaining your sitemap
For each sitemap, the report shows the status of the last request. A status of Success means the sitemap was fetched and read without any errors, as Google’s help page describes.
If a fetch fails, Google retries for a few days and then stops while the file stays unavailable or has critical errors. Fix the problem and resubmit with a new request.
A sitemap that was read successfully is recrawled at a pace unrelated to the regular site crawl. Resubmit after big changes, and otherwise let Google follow its normal schedule.
The report shows only sitemaps submitted through it or the API. If one you expect is missing, check that you aren’t confusing http/https or www/non-www properties.
Crawling the listed URLs can take time, and the same page warns that not every URL in a sitemap may be crawled. For realistic expectations about results, read our piece on how long does seo take.
Once your file is healthy, our guide to schema markup for seo is a sensible next technical step.
Frequently asked questions
Should I give every page a priority value?
Show answer
There is little point. Wikipedia reports that Google ignores those values, and that marking all pages as high priority does not affect search listings, because the value only suggests relative importance to crawlers. See the Sitemaps article.
What happens if I remove a sitemap in Search Console?
Show answer
Removing it only takes it out of the report: Google won’t forget the sitemap or the URLs in it. To stop Google visiting those URLs, you need a robots.txt rule, so says the Sitemaps report help page. Deleting the file or adding a noindex response header are alternatives.
Do other search engines use sitemaps too?
Show answer
Yes. Google, Yahoo! and Microsoft announced joint support for the protocol in November 2006, per Wikipedia.
How does a sitemap relate to robots.txt?
Show answer
They work as a pair. The sitemap protocol is a URL inclusion protocol, while robots.txt is a URL exclusion protocol, as Wikipedia puts it.



