Key Takeaways
- An XML sitemap is a file that lists the pages on your site you want search engines to find. It helps Google discover pages, but it does not force them into the index.
- Include only pages you want indexed, at their final addresses. Leave out redirects, duplicates, noindex pages and error pages.
- Use the last-modified date honestly. Google says it uses it when it is consistently accurate, and ignores the priority and change-frequency fields.
- A single sitemap can hold up to 50,000 addresses or 50 MB uncompressed. Larger sites use a sitemap index that points to several sitemaps.
- Submit your sitemap in Google Search Console and check the Sitemaps report for errors. Google retired its old sitemap ping in 2023.
What an XML Sitemap Is
An XML sitemap is a simple file, written in a format called XML, that lists the addresses of pages on your website. Search engines read it to find your pages and learn a little about them.
Think of it as a table of contents you hand to Google. Google can still find pages by following links, the way a reader flips through a book. The table of contents just makes sure nothing important is missed.
It is different from an HTML sitemap, which is a page on your site that lists links for visitors. This guide is about the XML kind, made for search engines.
What a sitemap does
- Helps Google discover pages, especially new pages and pages with few links.
- Signals which address is the main version of each page.
- Can tell Google when a page last changed.
- Gives you a report in Search Console showing how many listed pages are indexed.
What a sitemap does not do
- It does not force Google to crawl or index any page.
- It does not improve rankings by itself.
- It does not replace good internal links.
- It does not hide pages. Leaving a page out of the sitemap does not keep Google from finding it through links.
How Google Uses Your Sitemap
Google treats your sitemap as a helpful hint, not an order. When it reads the file, it adds any new addresses to its list of pages to consider. It may use the last-modified dates to decide which pages to recrawl. It also treats the addresses you list as a signal of which version of each page you prefer.
Then Google makes its own decisions. It crawls on its own schedule, and it indexes pages based on quality, duplication and many other factors. A page listed in the sitemap but never linked from your site, or one that is thin or duplicated, may still be left out.
That is why sitemaps work best together with good internal links and useful pages. The sitemap points the way. The site itself has to make the case.
Does Your Site Need One?
Google's documentation says sitemaps are most helpful for large sites, new sites with few links pointing to them, and sites with lots of rich media like video or images. Small sites that are well linked internally may not strictly need one.
In practice, we recommend a sitemap for every business site. It costs nothing, most platforms create it automatically, and the Search Console report it unlocks is one of the best ways to spot indexing problems.
What a Sitemap Looks Like
You rarely need to write one by hand, but it helps to recognize one. A very small sitemap looks like this:
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"> <url> <loc>https://yourbusiness.com/services/drain-cleaning</loc> <lastmod>2026-10-02</lastmod> </url> </urlset>
Each page gets a <url> entry with its address in <loc>. The optional <lastmod> gives the date the page last changed in a meaningful way.
Where to find yours
Most platforms publish the sitemap automatically. Try adding these to your domain in a browser.
- /sitemap.xml, the most common address.
- /sitemap_index.xml, common on WordPress with SEO plugins.
- /wp-sitemap.xml, WordPress's built-in sitemap.
Your robots.txt file, at /robots.txt, often lists the sitemap's address on a line that starts with "Sitemap."
Why Sitemaps Go Wrong
Sitemaps rarely break on their own. They go wrong because of how sites change over time:
- A second SEO plugin adds a second sitemap, and both get submitted.
- A redesign leaves an old sitemap file in place.
- Default settings include archives, attachments and other pages nobody wants indexed.
- A developer hand-builds a sitemap once and never updates it.
- Pages are set to noindex, but the sitemap keeps listing them.
Each of these sends Google mixed signals. A quick review after any big change prevents them.
What Belongs in Your Sitemap
The rule is simple: list the pages you want to appear in Google, at the exact address you want shown.
- Your homepage.
- Every service and product page.
- Location pages that have real content.
- Blog posts and guides worth finding.
- About, contact and other key pages.
Each address should be the canonical version: https, your chosen www or non-www form, and no tracking parameters.
What to Leave Out
A sitemap full of junk sends mixed signals and makes the Search Console report harder to read. Leave out:
- Redirected addresses. List the final page, not the old address that redirects to it.
- Pages marked noindex. Listing them asks Google to find pages you told it not to index.
- Duplicates. Print versions, filtered and sorted views, and pages with tracking parameters.
- Error pages. Addresses that return not found or server errors.
- Pages blocked by robots.txt. Google cannot crawl them, so listing them only creates warnings.
- Thin or private pages. Thank-you pages, login pages, carts and internal search results.
A clean sitemap is a clear statement: these are the pages that matter.
Use the exact address you want shown
Small differences in an address create different pages in Google's eyes. A page at http and https, with and without www, or with and without a trailing slash can look like four separate addresses.
Pick one form for every page, redirect the others to it and list only that form in your sitemap. Consistency between your sitemap, your internal links and your canonical tags makes Google's job easy, and it keeps your reports clean.
The Last-Modified Date: Use It Honestly
The <lastmod> field tells Google when a page last changed. Google's documentation says it uses this value when it is consistently and verifiably accurate. In a 2023 update, Google explained that meaningful changes, such as changes to the main text, structured data or links, are the kind that should update it.
Common lastmod mistakes
- Setting every page's date to today, every day, whether it changed or not.
- Updating the date for trivial changes, like a new copyright year in the footer.
- Leaving dates years out of date on pages you actually updated.
If Google sees that your dates do not match real changes, it may stop trusting them. Accurate dates help Google recrawl the right pages at the right time.
What about priority and change frequency?
Sitemaps can also include <priority> and <changefreq> fields. Google's documentation says it ignores both. They do no harm, but there is no point spending time on them for Google.
Size Limits and Sitemap Index Files
Under the sitemap protocol and Google's documentation, one sitemap file can list up to 50,000 addresses and be up to 50 MB uncompressed. Most small business sites are nowhere near that.
Larger sites split their pages into several sitemaps and list those in a sitemap index file. Many platforms already do this, with separate sitemaps for pages, posts, products and categories. You submit just the index, and Google finds the rest.
Splitting by type also helps you diagnose problems. If the products sitemap shows few indexed pages while the services sitemap looks healthy, you know where to look.
Sitemaps and Internal Links Work Together
A common mistake is relying on the sitemap to get pages found. If a page appears only in the sitemap, with no links pointing to it from your own site, Google sees it as unimportant. Such pages often sit unindexed.
Every page in your sitemap should also be reachable through normal links: from your menu, a hub page, related pages or your homepage. Think of the sitemap as a backup map. Your links are the roads.
When You Launch or Redesign a Site
Launches and redesigns are when sitemaps matter most.
- Make sure the new site's sitemap lists only new, live addresses.
- Remove any staging addresses that slipped in.
- Submit the new sitemap in Search Console on launch day.
- Keep the old addresses redirecting to their new pages, but do not list the old addresses in the new sitemap.
- Watch the Sitemaps and Pages reports over the following weeks for errors and indexing progress.
If you change your domain, add the new domain in Search Console and submit the new sitemap there as well.
When You Remove Pages
When you delete a page, make sure it disappears from the sitemap too. Most platforms do this automatically, but hand-built or cached sitemaps can keep listing pages that no longer exist.
- If the page had links or traffic, redirect it to the closest related page.
- If it had none, let it return a not-found status.
- Either way, take it out of the sitemap.
How to Submit Your Sitemap
- Open Google Search Console and choose your property.
- Go to the Sitemaps report.
- Enter the address of your sitemap or sitemap index.
- Click Submit.
Also list your sitemap in robots.txt with a line like Sitemap: https://yourbusiness.com/sitemap.xml. That helps other search engines find it too.
Google retired its old sitemap "ping" address in 2023, saying most pings were not useful. Submitting in Search Console and listing the sitemap in robots.txt are the ways to tell Google about it now.
Reading the Sitemaps Report
After you submit, the Sitemaps report shows each sitemap with:
- Status: whether Google could read it successfully, could not fetch it, or found errors.
- Last read: when Google last processed it.
- Discovered pages: how many addresses Google found in it.
Click a sitemap to see more detail, including a link to the Page indexing report filtered to just the pages in that sitemap. That view is very useful: it shows which of the pages you care about are indexed and why the rest are not.
Indexed counts that do not match
Owners often notice that the sitemap lists, say, 40 pages, but only 32 are indexed. That gap is normal to some degree. Click through to see the reasons. If the missing pages are important, work on them. If they are pages that should not be in the sitemap at all, remove them from it.
Common Sitemap Errors and Fixes
- Couldn't fetch. Google could not download the file. Check that the address is right, that it loads in a browser and that robots.txt or a firewall is not blocking it.
- Invalid format. The file has mistakes in its structure. Platforms and plugins usually generate it correctly, so this often points to a plugin conflict or a hand-edited file.
- URLs not followed or redirected. The sitemap lists old addresses. Update it to list final addresses.
- Blocked by robots.txt. Either unblock the pages or remove them from the sitemap.
- Wrong version of the address. The sitemap lists http or the wrong www version. Match it to your canonical addresses.
- Many listed pages not indexed. Not an error in the sitemap, but a sign to look at those pages' quality, duplication or internal links.
Using Your Sitemap to Diagnose Indexing
The most useful thing about a sitemap may be what it tells you. Because it lists exactly the pages you care about, Search Console can show indexing results for just those pages, without the noise of every address Google ever saw.
- Open the Sitemaps report and click your sitemap.
- Open its page indexing view.
- Look at how many listed pages are indexed and how many are not.
- Click each reason to see which important pages are affected.
If your services sitemap shows every page indexed, great. If half of your location pages are crawled but not indexed, you have found a specific problem to work on.
Sitemaps on Common Platforms
WordPress
WordPress has a built-in sitemap, and SEO plugins usually replace it with their own, often with more control. Use only one. Check that it leaves out tag archives, attachment pages and anything you do not want indexed.
Wix, Squarespace and Shopify
These platforms create and update sitemaps automatically. You mainly need to submit it in Search Console and make sure pages you hide or mark noindex are excluded as expected.
Custom sites
Your developer should generate the sitemap automatically from your real pages, with accurate dates, so it never goes stale.
Sitemaps for Online Stores
Stores have the biggest sitemap challenges, because platforms can generate many versions of each product and category.
- List each product once, at its main address, not every color or size variation with its own parameter.
- List main category pages, but not filtered or sorted versions.
- Remove discontinued products, or redirect them to the closest replacement.
- Split large catalogs into several sitemaps by type, so problems are easier to spot.
Several Locations or Two Languages
Businesses with several locations should make sure every real location page is in the sitemap and linked from a locations hub. Pages for areas you do not really serve, or near-identical city pages, are better left out and improved or removed.
For a bilingual site, list both the English and Spanish pages. Each language version should have its own address. Many sites also use the sitemap, or tags in each page, to connect each English page with its Spanish version, so Google shows the right language to each searcher.
New Websites and Sitemaps
For a brand-new site, the sitemap is especially useful. Few other websites link to you yet, so Google has fewer paths to find your pages. Submit the sitemap as soon as Search Console is verified, make sure your main pages are linked from the homepage and menu, and check the report after a week or two.
Do not expect every page to be indexed right away. New sites often take some time before Google crawls and indexes everything.
Special Sitemaps
Beyond regular pages, Google supports sitemap extensions for images, videos and news. Image and video details can help Google find media that might otherwise be missed. Most small business sites do not need separate media sitemaps, but sites built around galleries or video can benefit.
If your site has pages in more than one language, a sitemap can also list each page's language versions. That is one of the ways to tell Google which page is the Spanish version of which English page.
Do You Still Need an HTML Sitemap?
An HTML sitemap is a regular page listing links to your main pages, written for visitors. It can help people find their way on a large site, and it gives every listed page another internal link.
On a small, well-organized site with a clear menu, it adds little. On a large site with many sections, it can be a useful extra.
Myths About Sitemaps
"Submitting a sitemap gets my pages indexed"
It helps Google find them. Indexing depends on the pages themselves.
"Changing the lastmod date makes Google crawl faster"
Only if the date reflects a real change. Constantly changing dates without real updates can make Google stop trusting them.
"Higher priority values rank pages higher"
Google ignores the priority field. It has no effect on rankings.
"Leaving a page out of the sitemap hides it from Google"
Google can still find pages through links. To keep a page out of results, use a noindex tag.
"More sitemaps are better"
One clean sitemap, or one index pointing to a few, is enough. Several overlapping sitemaps from different plugins cause confusion.
Questions to Ask Your Developer
- Where is our sitemap, and is it generated automatically?
- Does it list only pages we want indexed, at their final addresses?
- Are the last-modified dates accurate?
- Is it listed in robots.txt and submitted in Search Console?
- Are we running more than one sitemap by accident?
Examples
A small service business
Say an electrician in Coral Springs has a 25-page site on WordPress. The SEO plugin's sitemap lists the pages, but also every tag archive and every image attachment page, more than 200 addresses in all. Turning those extras off leaves a clean list of 25 real pages, and the Search Console report becomes easy to read.
A store after a redesign
An online boutique launched a new site, but its old sitemap file was still in place, listing hundreds of addresses that now redirect. The Sitemaps report shows many redirect warnings. Removing the old file and submitting the new sitemap index cleans things up.
A bilingual law office
A law firm in Kendall has English and Spanish practice pages, but only the English ones appear in the sitemap. Adding the Spanish pages, and connecting each pair, helps Google find and show the Spanish versions to Spanish-speaking searchers.
A blog that dated everything today
A marketing blog's sitemap plugin set every post's last-modified date to the current day. After switching to real modification dates, Google has accurate signals about which posts actually changed.
A Sitemap Checklist
- Your site has one sitemap or one sitemap index.
- It lists only pages you want indexed, at final https addresses.
- No redirects, noindex pages, duplicates, errors or blocked pages.
- Last-modified dates reflect real changes.
- It is listed in robots.txt and submitted in Search Console.
- The Sitemaps report shows success.
- Every listed page is also linked from your site.
- It updates automatically when you add or remove pages.
Check Your Sitemap in Five Minutes
- Open your sitemap address in a browser. It should load a list, not an error.
- If it is an index, open one of the sitemaps it lists.
- Click a few addresses at random. Each should load the right page directly, with no redirect.
- Look for addresses that should not be there: tags, attachments, test pages, old pages.
- Check a page you updated recently. Does its last-modified date match?
- Open the Sitemaps report in Search Console and confirm the status is success.
If anything looks wrong, note it and ask your developer to adjust the sitemap settings rather than editing the file by hand.
How Often Google Reads Your Sitemap
Once submitted, Google rereads your sitemap periodically on its own schedule. You do not need to resubmit it every time you add a page, as long as it updates automatically. The "last read" date in the Sitemaps report shows when Google last processed it. Resubmitting can make sense after a major change, like a redesign.
Who Should Own the Sitemap
Like the rest of your site's technical setup, someone should be responsible for the sitemap. Usually that is your developer or SEO provider. Make sure they check it after every major change, and that Search Console is owned by your business so you can see the report yourself.
Other Search Engines
The sitemap format is a shared standard, described at sitemaps.org, so other search engines can read your sitemap too. Listing it in robots.txt is the simplest way to let them find it. Some also offer their own webmaster tools where you can submit it directly.
A Monthly Sitemap Check
- Open the Sitemaps report and confirm the status shows success.
- Compare discovered pages with the number of pages you expect.
- Open the indexing view for the sitemap and look for important pages not indexed.
- After launching or removing pages, confirm the sitemap updated.
The Short Version
Your sitemap should be a clean, honest, automatically updated list of the pages you want customers to find. Submit it once in Search Console, list it in robots.txt and check the report every month. Keep it free of redirects, duplicates and noindex pages, and keep your internal links strong. Do that, and the sitemap quietly does its job for years.
How We Help
Sitemaps are part of every technical SEO audit we run. We check what your sitemap includes, what it should leave out and what the Search Console data says about the pages in it. For the bigger picture, see our guide to technical SEO and our explanation of how Google Search works.
XML Sitemap FAQ
It is a file that lists the pages on your website you want search engines to find, usually at an address like yourbusiness.com/sitemap.xml. It helps Google discover pages and see which version of each one you prefer, but it does not force anything into the index.
Indirectly. It helps Google discover your pages, especially new ones and pages with few links, and it unlocks a useful indexing report in Search Console. It does not improve rankings by itself. Useful pages and good internal links still do the heavy lifting.
Leave out redirected addresses, pages marked noindex, duplicates like filtered or tracking-parameter versions, error pages, pages blocked by robots.txt, and thin or private pages like thank-you pages, carts and internal search results.
No. Google's documentation says it ignores both fields. It does use the last-modified date when that date is consistently accurate, so keep lastmod tied to real changes in the page's content, structured data or links.
One sitemap file can list up to 50,000 addresses and be up to 50 MB uncompressed. Larger sites split pages across several sitemaps and list them in a sitemap index file, which you submit to Search Console.
Open the Sitemaps report in Google Search Console, enter your sitemap's address and click Submit. Also add a Sitemap line to your robots.txt file. Google retired its old sitemap ping address in 2023.
Google could not download the file. Check that the address is correct and loads in a browser, that robots.txt does not block it, and that a firewall or security setting is not stopping Google. Then resubmit it in the Sitemaps report.
Yes. Pages that appear only in the sitemap, with no links from your own pages, look unimportant to Google and often stay unindexed. Link every listed page from your menu, a hub page, related pages or the homepage, and treat the sitemap as a backup map.
Sources
- Google Search Central: Build and submit a sitemap
- Google Search Central: Learn about sitemaps
- Google Search Central Blog: Sitemaps ping endpoint is going away (June 2023)
- Search Console Help: Sitemaps report
- Sitemaps.org: Sitemaps XML format
