SEO Guides
What Is a Sitemap? XML Sitemaps and Generators Explained
By Forsa | SEO Audit and Technical SEO Specialist
A sitemap tells search engines which URLs matter on your site. Learn what an XML sitemap is, which tags Google uses, how generators work and when you need one.
Short answer: A sitemap is a list of the pages on a website that you want people or search engines to know about. In SEO, the word almost always means an XML sitemap: a file, usually at yoursite.com/sitemap.xml, that tells search engines like Google and Bing which URLs exist and when they last changed in a meaningful way.
It is a discovery aid, not a ranking factor. A good sitemap helps search engines find your pages and notice your updates. It cannot make a weak page rank, and it does not force anything into the index.
This guide covers what a sitemap is, what an XML sitemap looks like, which tags still matter, what a sitemap generator does (and what it misses), and how to set one up properly.
What is a sitemap?
Google describes a sitemap as a file that gives information about the pages, videos and other files on your site and how they relate to each other. Search engines read it so they can crawl the site more efficiently.
There is a source of confusion, though. "Sitemap" means 3 different things depending on who you ask, and that is why search results for this term mix SEO guides with web design tools.
The 3 things people mean by "sitemap"
| Type | Who it is for | What it looks like | Affects SEO? |
|---|---|---|---|
| XML sitemap | Search engine crawlers | A machine-readable file of URLs, such as /sitemap.xml |
Yes, it helps with discovery and recrawling |
| HTML sitemap | Human visitors | A normal web page that links to the main sections of a site | Indirectly, through the internal links on the page |
| Visual sitemap | Designers, content teams and clients | A diagram or flowchart of a planned site structure | No, it is a planning document |
If you are working on search visibility, the XML sitemap is the one that counts. An HTML sitemap can still help visitors on a large site, and a visual sitemap is useful before a redesign. But neither one is what Google means when it asks you to submit a sitemap.
What is an XML sitemap?
An XML sitemap is a text file written in XML that follows the sitemaps protocol, a standard that Google, Bing and other search engines all support. Each entry is one URL you want crawled, plus optional details about it.
What an XML sitemap looks like
Here is a small, complete 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-10-28</lastmod>
</url>
<url>
<loc>https://www.example.com/services/roof-repair/</loc>
<lastmod>2026-09-14T10:30:00+00:00</lastmod>
</url>
</urlset>
<urlset> wraps the whole file. Each <url> block holds one page. Inside it, <loc> is the page address and <lastmod> is the date of the last significant change.
Which sitemap tags actually matter
The protocol defines 4 tags inside each <url>. Only 2 of them still do anything at Google or Bing.
| Tag | Required? | How Google uses it | How Bing uses it |
|---|---|---|---|
<loc> |
Yes | The URL to crawl, exactly as written | Same |
<lastmod> |
No | Used to schedule recrawls, but only if it is consistently and verifiably accurate | A key freshness signal; Bing recommends an ISO 8601 date with a time |
<changefreq> |
No | Ignored | Ignored |
<priority> |
No | Ignored | Ignored |
That table settles a lot of outdated advice. If a plugin asks you to set every page to priority 1.0 and changefreq daily, you can skip it. Google has said it does not use either value, and Bing said the same in 2025.
<lastmod> is the one worth getting right. Google has warned that if your pages claim they changed yesterday when they really changed years ago, it will eventually stop trusting your dates. Update it when the main content, structured data or links change. A new copyright year in the footer does not count.
Other sitemap formats you may run into
- Sitemap index file. A file that lists other sitemap files instead of pages, using
<sitemapindex>and<sitemap>tags. Large sites and most SEO plugins use one, often at/sitemap_index.xml. One index can list up to 50,000 sitemaps. An index cannot point to another index; Search Console reports that as an error. - Image, video and news sitemaps. These are XML extensions that add details such as a video's running time or a news article's publication date. They matter for sites that want that media or news content to appear in search.
- Text sitemap. A plain
.txtfile with one full URL per line and nothing else. It is simple, but it carries no dates or extra data. - RSS, mRSS and Atom feeds. Google accepts RSS 2.0 and Atom 1.0 feeds as sitemaps. They are easy because most CMSs create them, but they usually list only recent posts.
Rules and limits every XML sitemap must follow
These come from the sitemaps protocol and Google's documentation:
- A single sitemap can hold at most 50,000 URLs or 50MB uncompressed. Above either limit, split it into several files and list them in an index.
- The file must be UTF-8 encoded, and special characters such as
&must be escaped (&). - Use full, absolute URLs (
https://www.example.com/page/, not/page/). Google crawls them exactly as listed. - URLs should be on the same host and protocol as the sitemap.
- Location matters. Unless you submit it in Search Console, a sitemap only covers URLs inside its own folder. A sitemap at
/blog/sitemap.xmlcannot vouch for/products/. That is why the site root is the usual home. - You can gzip a sitemap to save bandwidth. The 50MB limit applies to the uncompressed size.
- The order of URLs does not matter to Google.
What a sitemap does in SEO, and what it does not
Search engines find pages mainly by following links. A sitemap gives them a second route: a direct list of the URLs you consider important.
What it does:
- Helps crawlers discover pages that are new, deep in the site or weakly linked.
- Signals updates through accurate
<lastmod>dates, so changed pages can be recrawled sooner. - Gives you reporting. Search Console shows whether Google could read your sitemap and how many URLs it found.
- Carries extra data for images, videos, news and alternate language versions.
What it does not do:
- It does not guarantee crawling or indexing. Google calls a submitted sitemap a hint.
- It does not improve rankings on its own. A page still has to earn its position.
- It does not replace internal links. A page that exists only in the sitemap may get found, but it gets no link signals from the rest of your site. That is why fixing orphan pages through your site architecture matters more than adding them to a file.
Do you need a sitemap?
Google's own guidance is that you might not need one if all 3 of these are true:
- Your site is small: about 500 pages or fewer that you want in search results.
- Every important page can be reached by following links from the homepage.
- You do not rely on video, image or news results.
You are more likely to benefit from one if your site is large, new with few external links, publishes often, or has a lot of media.
In practice, almost every site should have one anyway. It costs nothing, most platforms create it automatically, and it gives you a useful report in Search Console. If you use WordPress, Wix, Squarespace, Blogger or a similar platform, check before building one, because you probably already have it.
What is a sitemap generator?
A sitemap generator is any tool that builds the sitemap file for you, so you do not have to write XML by hand. Google says manual creation is only practical for sitemaps with a few dozen URLs. Beyond that, you need something to generate it.
Generators work in very different ways, and the method affects how accurate your sitemap will be.
The 3 main types of sitemap generators
| Type | Examples | How it gets the URL list | Best for |
|---|---|---|---|
| Built into the CMS or a plugin | WordPress core (/wp-sitemap.xml since version 5.5), SEO plugins, most site builders |
Reads the pages straight from the site's database | Most websites |
| Crawler-based tool | Online sitemap generators, desktop SEO crawlers | Starts at the homepage and follows links, like a search engine | Static sites, one-off builds, audits |
| Custom script | Code in your framework or backend | Queries your database or content files | Custom-built sites and large catalogs |
Google's documentation points to the first and third options as the strongest: the best way is to have your website software generate the sitemap. The reason is accuracy. Software that reads your database knows every published page, and it can update the file the moment something changes.
The blind spot of crawler-based generators
Crawler-based generators are handy, but they have a weakness that many guides skip. They can only find pages that are linked from somewhere on the site.
That creates 2 problems:
- They miss orphan pages. If a page has no internal links, the crawler never reaches it, so it is left out of the sitemap. Yet helping search engines find poorly linked pages is one of the main reasons to have a sitemap.
- They include pages you do not want. A crawler adds whatever it finds unless you configure it carefully: redirected URLs,
noindexpages, filtered or parameter URLs, and pages that point their canonical tag somewhere else.
Their output is also a snapshot. Unless you rerun the tool and upload the new file, the sitemap goes stale as soon as you publish or delete a page.
How to choose a sitemap generator
- Use what your platform already provides when it exists. It updates automatically.
- Check that it excludes non-indexable URLs: redirects,
noindexpages, non-canonical duplicates and error pages. - Make sure
<lastmod>reflects real content changes, not the time the file was generated. - Confirm it splits large sites into multiple files with an index once you pass 50,000 URLs.
- Prefer automatic updates over a file you must regenerate by hand.
- If you need a visual site plan for a redesign, that is a different product (a visual sitemap builder), not an XML generator.
How to create and submit a sitemap
1. Decide which URLs belong in it
Include only the canonical, indexable pages you want to appear in search results, and make sure each one loads with a 200 status. Leave out redirects, 404s, noindex pages, login or cart pages, and duplicate versions of the same content.
2. Generate the file
Turn on your CMS or plugin sitemap, use a crawler for a small static site, or ask your developer to build it from the database. Avoid having 2 plugins create competing sitemaps.
3. Publish it at the root of your site
https://www.example.com/sitemap.xml (or a sitemap index at a similar root address) covers the whole site. Open it in a browser to confirm it loads and is not blocked.
4. Reference it in robots.txt
Add a line like this anywhere in your robots.txt file:
Sitemap: https://www.example.com/sitemap.xml
Google and Bing both pick it up on their next robots.txt fetch, and you can list several sitemaps. If you are building the file from scratch, a robots.txt generator with a sitemap field adds the line in the right format.
5. Submit it to Google Search Console and Bing Webmaster Tools
In Search Console, open Sitemaps under Indexing, paste the sitemap URL and submit it. Do the same in Bing Webmaster Tools.
2 details are worth knowing:
- The Search Console Sitemaps report only lists sitemaps that you submitted there or through the API. A sitemap that Google found through robots.txt can still be used, but it will not appear in the report. Submit it anyway so you can see errors and read dates.
- The old "ping" URL for notifying Google about a sitemap stopped working after Google deprecated it in June 2023. A plugin setting that pings Google no longer does anything. For fast updates on Bing and other participating engines, IndexNow is the current option. It works alongside your sitemap, not instead of it.
6. Check it and keep it clean
After submitting, check that the status shows Success and that the number of discovered URLs roughly matches what you expect. Then look deeper: a sitemap can be valid XML and still list redirected, broken or noindex pages. A sitemap checker that tests the listed pages flags those problems so you can remove them.
Recheck after a redesign, a migration or a large content cleanup, since those are the moments when sitemaps fill up with dead URLs.
How to find a website's sitemap
To find the sitemap of your own site or a competitor's:
- Try the common addresses:
/sitemap.xml,/sitemap_index.xml(common with SEO plugins) and/wp-sitemap.xml(WordPress without a plugin). - Read the robots.txt file at
/robots.txtand look for a line that starts withSitemap:. - Check Search Console if it is your site. The Sitemaps report shows what has been submitted.
- Ask the developer or check the CMS settings if none of these work. Some sites use custom names.
Common sitemap mistakes
- Listing URLs you do not want indexed. Redirects,
noindexpages and non-canonical URLs send mixed signals. If a page is in your sitemap, it should be the version you want to rank. - Fake
<lastmod>dates. Setting every page to today's date teaches search engines to ignore your dates. - Forgetting to update it. A sitemap that still lists deleted pages or misses new ones has lost its purpose.
- Wrong protocol or host. Listing
http://URLs on anhttps://site, orwwwURLs when the site runs withoutwww. - Blocking listed pages in robots.txt. Search engines cannot crawl a URL that robots.txt disallows, even if the sitemap includes it.
- Exceeding the limits. More than 50,000 URLs or 50MB in one file needs to be split.
- Expecting it to fix indexing on its own. If pages are discovered but not indexed, the cause is usually quality, duplication or weak internal linking, not the sitemap.
FAQs
Is a sitemap free?
Yes. The sitemap protocol is an open standard, most CMSs generate a sitemap at no cost, and submitting it to Google Search Console or Bing Webmaster Tools is free. Paid tools mainly add crawling, scheduling or visual planning features.
What is the difference between an HTML sitemap and an XML sitemap?
An XML sitemap is a file written for search engine crawlers. An HTML sitemap is a regular page written for visitors, with links to the main sections of the site. You can have both, and they do different jobs.
Does a sitemap improve rankings?
Not directly. A sitemap helps search engines discover and recrawl your pages, which is a prerequisite for ranking. Where a page ranks still depends on its content, relevance and the signals around it.
How often should a sitemap be updated?
Whenever pages are added, removed or meaningfully changed. Automatic generation handles this. Bing says it typically rereads sitemaps at least once a day, and Google recrawls sitemaps on its own schedule, so there is no need to resubmit after every change.
Do sitemaps matter for AI search?
Google says pages need no extra technical work to appear in AI Overviews or AI Mode beyond being indexed and eligible for a snippet in Search, so the usual crawling and indexing basics, including a clean sitemap, apply. Bing has said that sitemaps with accurate lastmod dates help keep content fresh in its AI-powered answers, and it recommends pairing them with IndexNow.
Final thoughts
A sitemap is one of the simplest technical SEO tasks, and one of the easiest to get subtly wrong. Its job is narrow: list the pages you want in search, keep the update dates honest and make the file easy to find. Get those 3 things right, keep the list clean as your site changes, and the sitemap will do its part. The bigger wins still come from the pages themselves and from how well they are linked together.