Guide · 17 min read · Updated October 2026
What Is a Sitemap XML and How to Create One Free?
What is a sitemap XML?
To create an XML sitemap the easy way: use the sitemap your platform already makes, or run your site through a free XML sitemap generator, remove junk URLs, upload sitemap.xml to your site root and submit it in Google Search Console. Keep only canonical pages that return 200, and keep lastmod honest. That is most of the job.
Here is why it matters. A sitemap is the cheapest signal you control, and it is easy to break without noticing. SEO plugins can have the sitemap module switched off, so the address returns a 404 while everyone assumes it works. Open your own sitemap URL before you launch, and if it fails, fix the plugin or build a small file by hand and upload it to the root.
This October I launched a Las Vegas HVAC lead site and links.localseoflow.com. The only thing I did for both was submit the sitemap in Search Console. Both were indexed in about 12 hours. The file is simple. Everything around it is where people go wrong, and that is what this guide covers.
Key takeaways
- An XML sitemap is a list of the pages you want indexed. It helps discovery. It does not force indexing.
- Google ignores priority and changefreq. It uses lastmod only when the date is accurate.
- List only canonical URLs that return 200. No noindex, redirects, 404s or thin tag pages.
- A sitemap submit alone indexed two of my new sites in about 12 hours. It is the cheapest SEO step there is.
- Use your platform sitemap or the free free XML sitemap generator, then read the file before you submit it.
What is a sitemap XML?
An XML sitemap is a file that lists the important URLs on your website so search engine crawlers can find them. It usually lives at yoursite.com/sitemap.xml. Each entry holds a page URL and, if you want, the date it last changed. Crawlers use it as a second route to your pages, beyond following links.
Picture your website as a building. Internal links are the hallways. A visitor who walks every hallway sees most rooms. The sitemap is the directory by the front door. It lists every room that matters, including the ones down hallways nobody walks.
Nobody reads it for fun. It exists for robots. XML is just structured text with labels machines understand. The format comes from the sitemaps.org protocol, which Google, Bing and other engines all support.
XML sitemap vs HTML sitemap
An HTML sitemap is a normal page for people, with links to your sections. An XML sitemap is for crawlers only. Google does not treat an HTML sitemap as a sitemap file. You can have both, but the XML one is the file you submit.
What is sitemap.xml in SEO and does my website need one?
New sites, large sites and sites with weak internal linking need one most. If pages sit several clicks deep, have no links pointing at them or number in the thousands, a sitemap gives crawlers another way in. A small, well linked site can get found without one, but a sitemap takes minutes and costs nothing.
New sites are the clearest case. Google has no history with you and you have few backlinks. The sitemap is the one signal you control on day one that says "these pages exist." My two October launches got indexed in about 12 hours after I submitted only the sitemap.
Orphan pages are the other case. The service page nobody linked from the menu. The old blog post that fell off the home page. The sitemap is their second chance.
Does submitting a sitemap guarantee Google will index my pages?
No. A sitemap is a hint, not a command. Google says plainly that submitting one does not guarantee the file will be read, the URLs will be crawled or the pages will be indexed. Indexing is a separate decision based on page quality, uniqueness and how much crawl attention your site has earned.
I saw this on the main LocalSEOFlow site. Search Console read the sitemap successfully, with 61 URLs discovered. Yet URL Inspection on some pages still showed "No referring sitemaps detected." A successful read is not the same as every page being crawled and indexed. Statuses like "URL is unknown to Google" or "Discovered, currently not indexed" can still appear while Google works through the list.
So keep expectations honest. A sitemap raises the ceiling on discovery. It does not raise the floor on quality. When pages are stuck, internal links and a few real backlinks usually move them. The steps are in how to index your website on Google fast.
How to create an XML sitemap step by step for free?
To create an XML sitemap, decide which pages you want indexed, choose a generator that fits your platform, exclude junk URL patterns, run the crawl, review the URL list, then upload sitemap.xml to your site root. The step almost everyone skips is the review. That review is the difference between a useful sitemap and a bloated one.
- Walk your own site. List the pages you want in search: services, locations, products, key posts.
- Pick your method. WordPress with Yoast or Rank Math, Shopify, Wix and Squarespace make one for you. For anything else, use a free XML sitemap generator.
- Set exclusions first. Block /tag/, /category/ and /author/ if they add nothing. Block admin and search result pages.
- Run the crawl.
- Read the URL list. Remove anything you would not want a stranger to land on.
- Upload and test. Put the file at your root as sitemap.xml and open it in a browser.
Where to find the sitemap you already have
| Platform | Usual sitemap URL | Notes |
|---|---|---|
| WordPress with Rank Math or Yoast | /sitemap_index.xml | Split into post, page and category sitemaps |
| WordPress core only | /wp-sitemap.xml | Built in since WordPress 5.5 |
| Shopify | /sitemap.xml | Automatic, cannot be edited directly |
| Wix and Squarespace | /sitemap.xml | Automatic |
| Custom, static or Next.js | /sitemap.xml | You generate it yourself |
Example: picture a new HVAC site with about twenty pages, two weeks from launch. The owner opens yoursite.com/sitemap.xml and gets a 404, because the sitemap module in the SEO plugin was switched off during setup. There are two clean fixes. Turn the module back on and confirm the file loads, or crawl the site with the free sitemap generator online, read the URL list, and upload sitemap.xml to the root. Either way, submit it in Search Console on launch day and check that the discovered count matches the pages you expect.
How to make an XML sitemap with the best free generator?
For most sites, the best XML sitemap generator is the one built into your platform. WordPress users should use Yoast or Rank Math. Shopify, Wix and Squarespace already make one. For other sites, a free online XML sitemap generator works for a quick file, and Screaming Frog suits people who want to audit the crawl first.
Prices are left out of this table on purpose, except where a tool is plainly free. Paid tiers change often, so check each vendor page.
| Tool | Type | Best for | Honest catch |
|---|---|---|---|
| LocalSEOFlow XML Sitemap Generator | Free online | Small and local sites that need a clean file with exclusions | Crawls up to 500 URLs, and a static file needs a regeneration habit |
| Yoast SEO | WordPress plugin | WordPress sites | Lists whatever the settings allow, so review them |
| Rank Math | WordPress plugin | WordPress sites that want fine control | Modules can get switched off by accident |
| WordPress core | Built in | Sites with no SEO plugin | Few controls |
| Shopify, Wix, Squarespace | Built in | Sites on those platforms | Little customization |
| Screaming Frog SEO Spider | Desktop app | Seeing the crawl before exporting | Free version stops at 500 URLs, and it needs an install |
| XML-Sitemaps.com | Online | A classic one off file | Static file, upsell to paid plans |
| Small SEO Tools | Online | Fast generation with no install | Static file, little guidance |
What the LocalSEOFlow generator is built to do
It is built for the case where a plugin sitemap is missing or messy. It crawls any site with no install, lets you exclude junk patterns before generating, can include images, and lets you review the list before downloading. The exclude box comes prefilled with /tag/, /category/ and /author/, because plugin sitemaps are often packed with tag and attachment pages.
Free XML Sitemap Generator
Crawl up to 500 URLs, skip noindex, canonicalized and redirected pages, add image entries and download a clean sitemap.xml. No signup.
What should and should not go in an XML sitemap?
An XML sitemap should list only URLs you want indexed: canonical pages that return a clean 200 status. Never include noindex pages, redirects, 404s, pages blocked by robots.txt, duplicate versions or thin pages you would not show a visitor. Every wrong URL sends Google a mixed signal and wastes crawl attention.
| Include | Leave out |
|---|---|
| Home, service and location pages | Pages with a noindex tag |
| Product and category pages with real content | URLs that redirect |
| Blog posts you are proud of | 404 and 5xx pages |
| Key images, if you use an image sitemap | Pages blocked by robots.txt |
| The canonical version of each page | Tag, author, attachment and search pages that add nothing |
The mixed signal problem is the real killer. Your sitemap says "please crawl this." The page says "do not index me." You are sending directions and roadblocks in the same envelope.
A common case: a WordPress blog with a few dozen real posts has a plugin sitemap listing hundreds of URLs. Most are tag archives, author pages and image attachment pages, each with a line or two of content. Crawlers spend their visits on those thin pages, and Search Console fills up with "Crawled, currently not indexed." The fix is to turn off the tag, author and attachment sitemaps in the plugin, or use the exclude patterns in the generator, then resubmit once. The sitemap should read like a list of pages you would happily show a customer.
This is why the LocalSEOFlow generator drops noindex, canonicalized and redirected pages by default. If you want to check a single page yourself, run it through the Indexability Checker.
What does an XML sitemap look like?
A clean XML sitemap uses the standard namespace and lists each page with a loc tag and, where you know it, an honest lastmod date. That is all Google needs. Priority and changefreq are optional extras that Google ignores, so a short, honest file beats a long, decorated one every time.
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>https://example.com/ac-repair-las-vegas/</loc>
<lastmod>2026-09-28</lastmod>
</url>
<url>
<loc>https://example.com/blog/why-your-ac-freezes-up/</loc>
<lastmod>2026-10-02</lastmod>
</url>
</urlset>Two entries, each with a URL and the date its content last really changed. Compare that with the bloated version many generators produce: every URL with priority 0.5, changefreq weekly and a lastmod of today. Bigger file, less truth.
If you know the real change date for only one page, give that page a lastmod and leave the others without one. A missing date is more honest than a fake one.
What are the XML sitemap best practices in 2026?
The core XML sitemap best practices are simple: list only indexable canonical URLs, keep lastmod accurate, stay under 50,000 URLs and 50 MB per file, use a sitemap index for bigger sites, reference the sitemap in robots.txt, submit it in Search Console and Bing, and regenerate it whenever pages change.
- Indexable URLs only. 200 status, canonical to itself, no noindex.
- Absolute URLs. Use full https addresses, on the same host as the sitemap.
- Honest lastmod. Or none at all.
- Respect the limits. 50,000 URLs or 50 MB uncompressed per file.
- Split large sites. Use a sitemap index with child files by content type.
- Point to it in robots.txt. One Sitemap line is enough.
- Submit once, then monitor. Check the Sitemaps report for errors.
- Keep it fresh. Use a dynamic sitemap or a monthly regeneration habit.
Add this line to your robots.txt so every engine finds the file:
Sitemap: https://example.com/sitemap.xmlJust make sure robots.txt does not also block the pages in your sitemap. On an old build of LocalSEOFlow, the home page showed "Indexed, though blocked by robots.txt" because an older robots.txt blocked it. The sitemap invited Google in. The robots.txt turned it away.
Should I add images to my XML sitemap?
Add images when they matter for search, such as product photos, project photos and team or location shots on a local business site. An image sitemap entry helps Google find pictures loaded by scripts or sliders that crawlers can miss. If your images are plain img tags on indexed pages, Google usually finds them anyway.
The LocalSEOFlow generator has an image toggle for this. When it is on, each page entry also lists the images on that page. Switch it on for local service sites, because job photos are often the most original content those sites have.
- Compress first. Big files slow the page down. The Image Compressor shrinks them without visible loss.
- Name files clearly. ac-repair-summerlin.jpg beats IMG_4402.jpg.
- Write real alt text. Describe the photo for a person who cannot see it.
- Skip decorative images. Icons and background shapes do not need sitemap entries.
For more on image work, the image compressor guide covers quality settings, and the geotagging photos for local SEO guide explains what Google really keeps from photo metadata.
Beginner vs advanced setup
Beginners should keep one sitemap with images turned on and stop there. Advanced users on big sites can split images into their own child file under a sitemap index, which makes errors easier to trace. Both approaches follow the same sitemaps.org protocol.
What is a sitemap index file and when do I need one?
A sitemap index is a parent file that points to several child sitemaps. You need one when a single file would pass 50,000 URLs or 50 MB uncompressed, or when you want to organize a big site by content type. You submit the index to Search Console, and Google works through each child file.
Split by type: products in one file, posts in another, location pages in a third. When the products file throws an error, you know exactly where to look. Keep each child well below the limit. A file with 50,001 URLs breaks the rule.
<?xml version="1.0" encoding="UTF-8"?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<sitemap>
<loc>https://example.com/sitemap-pages.xml</loc>
</sitemap>
<sitemap>
<loc>https://example.com/sitemap-locations.xml</loc>
</sitemap>
</sitemapindex>No free online generator will crawl a 50,000 page store for you. At that size, generate the sitemap from your database or platform, not from a crawl.
How do I submit my XML sitemap to Google?
Open Google Search Console, pick your property, click Sitemaps, type the sitemap path such as sitemap.xml and click Submit. Check that the status says Success and that the discovered URL count matches the number of pages you want indexed. If the count is far off, your sitemap is misleading Google.
- Verify your site as a Domain property in Search Console.
- Open Sitemaps in the left menu.
- Enter the path, for example
sitemap.xmlorsitemap_index.xml, and click Submit. - Wait for the status to show Success and read the discovered URL count.
- Do the same in Bing Webmaster Tools. The same file works.
One Domain property can hold several sitemaps, so a main site and its subdomains can share one Sitemaps page.
Stop resubmitting every day
Resubmitting the same sitemap every day changes nothing. Google rechecks on its own schedule, and its own docs on asking Google to recrawl say crawling can take days to weeks. Also note that Google retired its old sitemap ping URL in 2023, so pinging does nothing now. Submit once, read the report and fix real problems.
For pages you need crawled sooner, add a push. Instant Index can import your sitemap and send every URL to Bing and other engines through IndexNow. The website indexer guide explains what that does and does not reach.
How often should I update my XML sitemap?
Update your sitemap whenever you add, delete or meaningfully change pages. Plugins like Yoast and Rank Math do this automatically. If you use a static file from a free XML sitemap generator, regenerate it at least monthly, or weekly if you publish weekly. A stale sitemap slowly turns into a list of dead and missing pages.
This is the stale file problem. You run a generator once, upload a beautiful file and forget it. Six months later it lists twelve deleted pages and misses forty new ones. Google keeps checking the old list.
Two honest fixes. Use a dynamic sitemap that updates when you publish. Or put a reminder on the calendar for the first Monday of each month. It takes ten minutes.
For example, a dentist adds three new treatment pages and deletes an old promotions page, but the site still serves a static sitemap generated last year. Google keeps finding the dead promotions URL and never sees the new treatment pages through the sitemap. Regenerating the file after each round of changes, then checking the Sitemaps report for the new URL count, keeps the list honest.
Why are pages in my sitemap still not indexed?
A sitemap only handles discovery. If pages are discovered but not indexed, the problem is the page. Check the Sitemaps report for errors, inspect a sample URL, look for canonical conflicts and noindex pages in the file, and be honest about content quality. Then add internal links and a few real backlinks to the pages that matter.
- "Couldn't fetch" on a valid file. Usually server trouble or low crawl demand, not a broken file.
- Discovered, currently not indexed. Google knows the URL but has not crawled it. Link it from strong pages.
- Crawled, currently not indexed. Google read it and passed. Improve or merge the page.
- Duplicate without user selected canonical. Your sitemap URL and your canonical disagree. Fix the mismatch.
For local sites, the classic case is near identical city pages. Fifty pages with only the city name changed will mostly be skipped. The Service Area Page Planner helps you plan pages that are actually different.
Links help too. Two local service clients had service pages that would not index. I ran them through the Backlink Indexer, and both sets were indexed within 24 hours. The backlink indexer guide explains how, and how to index backlinks fast has the full method.
What are the most common XML sitemap mistakes?
The most common mistakes are a sitemap that returns 404, listing noindex or redirected URLs, stamping fake lastmod dates, blocking sitemap pages in robots.txt, never updating a static file and resubmitting daily. Every one of them is free to fix in under an hour.
- The missing file. Open your sitemap URL today. A switched off plugin module can leave it as a 404.
- Dumping every route in. Tag, attachment and author pages crowd out your real pages.
- Fake freshness. Today as lastmod on every URL teaches Google to ignore your dates.
- Robots.txt conflicts. Do not list pages you block.
- Set and forget. Static files rot.
- Missing structured data. Once pages are indexed, help them stand out with the Schema Markup Builder.
Open your sitemap in a browser this week and read it. Count the URLs you would not defend and remove them. That one hour will do more for your crawl health than any tool purchase.
Frequently asked questions
What is the difference between HTML and XML sitemaps?
An XML sitemap is written for search engines and lists URLs with optional dates. An HTML sitemap is a normal page that helps visitors find content. Most sites need the XML one. An HTML sitemap is optional and mostly helps large sites with deep menus.
Is sitemap.xml still relevant?
An XML sitemap is a file that lists the important pages on your website for search engines. It usually lives at yoursite.com/sitemap.xml. It helps crawlers find pages they might miss through links, but it does not guarantee indexing.
How do I create an XML sitemap for free?
Use the sitemap your platform already makes, such as Yoast, Rank Math, Shopify or Wix. For other sites, run a free XML sitemap generator like the LocalSEOFlow tool, review the list, upload sitemap.xml to your root and submit it in Search Console.
What is the best free XML sitemap generator?
For WordPress, Yoast or Rank Math. For other small sites, a free online generator that skips noindex and redirected pages, like the LocalSEOFlow XML Sitemap Generator. Screaming Frog is best when you want to audit the crawl first.
Does Google ignore priority and changefreq?
Yes. Google ignores both tags. It uses lastmod only when the dates are consistently accurate. Keep loc and an honest lastmod and do not worry about the rest.
How many URLs can an XML sitemap have?
Up to 50,000 URLs or 50 MB uncompressed per file. Bigger sites split their URLs into several child sitemaps and list them in a sitemap index file.
How long does it take Google to read a new sitemap?
Often within a day. My two new sites were indexed in about 12 hours after a sitemap submit. Deeper pages on a young domain can take one to four weeks.
Should noindex pages be in my sitemap?
No. The sitemap asks Google to crawl the page while the noindex tag tells Google not to index it. That mixed signal wastes crawl attention. Remove noindex pages from the file.
Do small websites need an XML sitemap?
Not strictly. A small, well linked site can be found without one. But a sitemap takes minutes, costs nothing and works as cheap insurance, especially for a brand new site.
How can I find the sitemap.xml file for a website?
At your site root, such as example.com/sitemap.xml. A sitemap in a subfolder can only list URLs inside that folder. Add a Sitemap line to robots.txt so every engine finds it.
Can a sitemap improve my rankings?
Not directly. It helps more pages get discovered and indexed, which gives them a chance to rank. It does not make any single page rank higher.
Why are my sitemap pages not indexed?
Discovery is usually fine. Look for thin or duplicate pages, canonical conflicts, noindex leaks and low crawl demand. Link stuck pages from strong pages and build a few real backlinks to them.
Do I need a separate generator if I use Yoast or Rank Math?
No. The plugin already makes one. But open the sitemap URL and confirm it loads, then review what it lists. A switched off sitemap module is a common reason it returns a 404.
Free tools for this
XML Sitemap Generator
Free XML sitemap generator: skips noindex and redirects, adds images.
Instant Index
Import your sitemap and push every URL through IndexNow.
Indexability Checker
Check any page for noindex, robots.txt and canonical problems.
Schema Markup Builder
Add structured data once your pages are indexed.