table of contents
A good XML sitemap lists only the pages you want in Google’s index, uses accurate <lastmod> dates, stays under the size limits, and is submitted in Google Search Console and referenced in robots.txt. Everything else is detail. The rest of this guide covers that detail: what belongs in the file, what to leave out, how to split a large sitemap, and how to submit it.
We build and optimize sites for small and mid-sized businesses in Tampa Bay and across the U.S., and sitemap problems are one of the most common technical issues we find. They are also among the easiest to fix.
TL;DR
- Include only canonical, indexable URLs that return a 200 status. Leave out redirects, noindex pages, and anything blocked by robots.txt.
- Keep each sitemap under 50,000 URLs and 50 MB uncompressed, and use a sitemap index file once you grow past that.
- Use
<lastmod>only when it reflects a real, significant change. Google ignores<priority>and<changefreq>. - Submit the sitemap in Search Console, add it to robots.txt, and check the report for errors after every site change.
- A sitemap is a hint, not a guarantee of crawling or indexing.
What an XML sitemap does (and does not do)
A sitemap is a file where you tell search engines about the pages, videos, and other files on your site, and how they relate. Google’s documentation describes it as a way for search engines to crawl your site more efficiently.
The key word is hint. Google can often find your pages without a sitemap if your navigation is clear and every important page is reachable through internal links. Per the same documentation, sitemaps matter most for large or complex sites, new sites with few external links pointing to them, and sites with a lot of rich media.
A sitemap also does not equal indexing. Putting a URL in the file suggests it to Googlebot. Google may still decide not to crawl it, or to crawl it and not index it. If you want the full picture of how pages get into Google, see our guide to getting your website indexed by Google.
Sitemap, HTML sitemap, and robots.txt: three different jobs
Business owners often mix these up, so here is the short version:
- XML sitemap: a machine-readable list of URLs for search engines.
- HTML sitemap: a page for human visitors that links to the main sections of your site. If you are planning one, our website site map examples show what works.
- robots.txt: instructions about which URLs crawlers may fetch. Google notes it is mainly used to manage crawler traffic and is not a way to keep a page out of Google.
Best practice 1: List only URLs you want indexed
This is the rule that matters most. Google’s guidance is to include canonical URLs. A sitemap full of other URLs sends mixed signals and spends crawl attention on pages that will never rank.
Keep these out of your sitemap:
- Pages with a
noindextag - URLs blocked in robots.txt
- URLs that redirect (list the final destination instead)
- Pages that return 404 or 5xx errors
- Duplicate versions of a page, such as parameter URLs, print versions, or both
httpandhttps - Thin utility pages: internal search results, cart and checkout steps, login pages, thank-you pages
Treat the sitemap as your short list of what you are proud of. If a page is not something you would want a stranger to land on from Google, it does not belong in the file.
Match the sitemap to your canonical tags
The URL in the sitemap should be the same URL the page declares as canonical, with the same protocol, the same www or non-www choice, and the same trailing-slash convention. A mismatch is one of the most common causes of the “Duplicate, Google chose different canonical” status in Search Console.
Do not forget the pages that make money
We often see the opposite problem on small business sites: the sitemap is clean, but a key service page or location page is missing because it was built with a page builder or a custom template that the sitemap plugin ignores. Compare your sitemap against your list of revenue pages. If a service page you want to rank is absent, fix that first.
Best practice 2: Respect the size limits
Per the sitemaps protocol, each sitemap file can hold at most 50,000 URLs and must be no larger than 50 MB uncompressed. A sitemap index file can in turn list up to 50,000 sitemaps.
Most small business sites will never come near those numbers. An e-commerce store with many product variations, or a directory-style site, can. When you do exceed them, split the URLs into several sitemaps and tie them together with a sitemap index, as Google explains for large sitemaps.
Why a sitemap index is worth it even on a small site
A sitemap index is a file that lists other sitemap files. Even if your site has 40 pages, using one is a sensible habit. You can split content into separate sitemaps for pages, blog posts, products, and media, and you submit only the index once in Search Console. When the site grows, you add a new child sitemap without touching your submission.

Splitting by content type has a second benefit. In Search Console you can see indexing status for each child sitemap, so you can tell quickly whether your service pages are indexed but your blog posts are not, or the reverse.
Best practice 3: Use lastmod honestly, and skip priority and changefreq
The XML format allows three optional tags besides the URL: <lastmod>, <changefreq>, and <priority>. Google’s documentation says it ignores <priority> and <changefreq>. You can leave them out. They add file weight and give you a false sense of control.
<lastmod> is different. Google uses it when it is consistently and verifiably accurate, for example when it matches the page’s real modification history. The date should reflect the last significant update: changes to the main content, the links, or structured data. A footer copyright year or a small CSS tweak does not count.
The usual mistake is a plugin or custom script that stamps every URL with the current date each time the sitemap is regenerated. Once Google sees that your dates do not match reality, it can stop trusting the tag for your whole site. Do this instead:
- Pull
<lastmod>from the page’s actual content-modified field in your CMS. - Do not update it for template or design changes that leave the content untouched.
- Use the full W3C datetime format, such as
2026-10-21or2026-10-21T09:30:00-04:00.
Best practice 4: Get the technical format right
Small formatting errors can make a whole file unreadable. Check these:
- UTF-8 encoding. The protocol requires it.
- Absolute URLs. Use the full address, including
https://, never a relative path. - Entity escaping. Characters such as the ampersand, quotes, and angle brackets must be escaped in the XML. The sitemaps.org FAQ lists the codes. This matters most for URLs with query strings.
- Correct location. Put the file at a stable address, usually the site root, such as
/sitemap.xmlor/sitemap_index.xml. - One host per sitemap. Do not mix
wwwand non-wwwURLs in the same file.
If you edit sitemaps by hand, run the file through an XML validator before you upload it. If you use WordPress, a reputable SEO plugin handles the formatting for you, and your job is mainly to choose what it includes.
Best practice 5: Use extensions for video, images, and news
If video or news drives traffic for your business, a standard sitemap is not the best tool. Google offers sitemap extensions that carry richer details.
- Video sitemaps give Google information about videos on your pages, such as the thumbnail location and duration. Google’s video sitemap documentation calls it a good way to help Google find and understand video content, especially content added recently.
- News sitemaps are for publishers. They let you tell Google about news articles and their publication dates, and you can either extend your existing sitemap or create a separate news sitemap.
- Image sitemaps help when images are loaded in ways Google may not discover, such as through JavaScript galleries.
A local plumber or dental practice rarely needs a news sitemap. A home services company with a library of how-to videos or an e-commerce brand with product videos often benefits from a video one.
How to submit your sitemap to Google
Once the file is clean, there are two ways to tell Google where it is. Use both.
Option 1: Submit it in Google Search Console
- Sign in to Google Search Console and select your verified property.
- Open Sitemaps in the left menu.
- Enter the sitemap’s address, such as
sitemap_index.xml, in the “Add a new sitemap” field. - Click Submit.
- Return in a day or two and check the status. “Success” means Google fetched and parsed it. “Couldn’t fetch” or an error means something is wrong with the file or its location.
Google describes the process in its build and submit a sitemap guide. If you have not set up Search Console yet, start with the property and ownership verification, then come back to this step. Our walkthrough on adding your website to search engines covers both.
Option 2: Reference it in robots.txt
Add a single line to your robots.txt file pointing to the full sitemap URL, for example Sitemap: https://www.example.com/sitemap_index.xml. This lets any crawler that reads robots.txt find it, not just Google. Google’s documentation lists this as one of the supported ways to make a sitemap available.
Do not resubmit it over and over
Submitting once is enough. Google reads the file again on its own schedule. Google’s advice is against submitting the same unchanged sitemap multiple times per day, and for most sites it expects that new pages take at least three days to be discovered, crawled, and indexed. Resubmitting does not speed that up. If you publish a new page and nothing shows up after a week, look at the page itself: internal links, content quality, and whether it is accidentally noindexed.
Mobile-first indexing and your sitemap
Google indexes the mobile version of your pages. Its mobile-first indexing guidance says mobile and desktop versions should have equivalent content and crawlable links. If you run a separate mobile site on an m. subdomain, which is rare now, make sure the URLs and annotations are consistent. For responsive sites, which is what we build, a single set of URLs in the sitemap is all you need.
The practical check: if a page exists on desktop but its content or links are stripped on mobile, a sitemap entry will not rescue it.
Common sitemap mistakes we see in audits
- Staging or development URLs in the live sitemap after a site migration.
- Redirected URLs left over from a redesign, such as old
httpor old slug versions. - Noindex pages listed because a plugin includes every post type by default.
- Tag, author, and date archive pages in a WordPress sitemap that add near-duplicate content and no value.
- A
lastmodthat changes daily for every page. - Forgetting to update after a redesign. A new site with new URL structure and an old sitemap is a classic cause of lost rankings.
- No sitemap reference in robots.txt and no Search Console submission at all.
A quick way to find most of these is to crawl your sitemap URLs with an SEO crawler and filter for anything that is not a 200 status, is noindexed, or has a canonical pointing elsewhere. Our technical SEO audit guide walks through that process step by step.
Our perspective: treat the sitemap as a quality filter
We think of the sitemap as the shortest honest statement of what a website is. When we audit a small business site in St. Petersburg, Tampa, or Clearwater, the sitemap often reveals the real problem within minutes. If it has 600 URLs and the business has 25 pages that matter, the site is leaking attention into archives, tag pages, and leftovers. If it has 15 URLs and the business sells 40 services, pages are probably missing from the CMS output.
Our view is simple. The sitemap should be generated automatically so it never goes stale, but the rules behind it should be decided by a person who understands the business: which page types earn a place, which do not, and why. Plugin defaults are a starting point, not a strategy.
We also like to keep expectations realistic with clients. A tidy sitemap will not push a weak page to position one. It removes obstacles so that good pages are found and understood quickly. The ranking work still comes from relevant content, strong on-page signals, and links, which is why we pair sitemap cleanup with on-page SEO factors and a wider technical SEO review.
One more point about AI-driven search. Answer engines and AI assistants still depend on crawlable, well-structured, clearly canonical pages. A clean sitemap is a small part of that foundation, and it costs almost nothing to get right.
— Lori Piencykoski
A sitemap setup checklist you can follow today
- Open your sitemap in a browser and count the URLs. Does the number match the pages you actually want indexed?
- Crawl the list. Remove anything that redirects, errors, or carries noindex.
- Confirm every URL matches its canonical tag exactly.
- Check that each
<lastmod>reflects a real content change. If not, fix the source of the date. - Drop
<priority>and<changefreq>if your plugin lets you. - Split into a sitemap index with separate files by content type.
- Add a
Sitemap:line to robots.txt. - Submit the index in Search Console and review the status after a couple of days.
- Re-check after every redesign, migration, or major content cleanup.
What about schema markup tools?
People often search for sitemap help and schema markup help in the same session, because both live in the technical SEO bucket. They do different jobs. A sitemap helps search engines find your pages. Structured data helps them understand what is on a page, such as a local business, a product, or an FAQ. You can have a flawless sitemap and no schema, or the reverse.
When you choose a schema tool, look for one that outputs JSON-LD, lets you validate the result before you publish, and fits your CMS. Check the markup against Google’s structured data documentation for your page type, since eligibility for rich results depends on Google’s own rules and not on the tool. The order we recommend is: fix crawling and indexing first, including the sitemap, then add structured data to the pages that matter most.

Let us handle the technical side
If you would rather not dig through XML files and Search Console reports yourself, our team can do it for you. We review sitemaps, robots.txt, canonical tags, and indexing status as part of our SEO services, and we build new sites with clean URL structures and automated sitemaps from day one through our web development work. If you want your team to own this in-house, we also offer customized training. You can see everything we do on our all services page.
FAQ
Do I need an XML sitemap if my site is small?
Not strictly. If every page is linked from your navigation and your site is small, Google can usually find everything without one. A sitemap is still cheap insurance, especially for a new site with few backlinks, and it gives you indexing data in Search Console.
How often should I update my sitemap?
It should update automatically whenever you publish, remove, or significantly change a page. Use a plugin or your platform’s built-in generator rather than editing it by hand. You do not need to resubmit it each time, because Google rechecks it on its own.
Should I include priority and changefreq in my sitemap?
No. Google states that it ignores both values. Keep the file lean with the URL and an accurate lastmod.
Why is my sitemap submitted but my pages are not indexed?
A sitemap only suggests URLs. Google may skip pages because of thin or duplicate content, a noindex tag, a canonical pointing elsewhere, or weak internal links. Open the page indexing report in Search Console to see the stated reason for each URL, then fix the page, not the sitemap.
Can one sitemap cover multiple subdomains?
No. A sitemap should only list URLs from the host where it lives. If you run blog.example.com and www.example.com, give each its own sitemap and submit each in its own Search Console property.
Sources
- Build and Submit a Sitemap, Google Search Central
- What Is a Sitemap, Google Search Central
- Manage Your Sitemaps With Sitemap Index Files, Google Search Central
- Video Sitemaps and Examples, Google Search Central
- Create a News Sitemap, Google Search Central
- Robots.txt Introduction and Guide, Google Search Central
- Mobile-first Indexing Best Practices, Google Search Central
- Sitemaps.org Protocol
- Sitemaps.org FAQ



