A sitemap is a list of the pages on your site that you want search systems to find. It does not rank your pages, and it does not force a crawler to read them. It points crawlers at the right addresses, in the right form, so they can discover pages they might otherwise miss. For AI answers, that matters because an AI system can only cite a page it can find.
Platform screens change. If a menu name here does not match what you see, check the vendor docs linked in Sources for the current path.
Most shops do not need to build a sitemap by hand. Most platforms generate one for you. The job in this guide is to confirm the generated sitemap is correct, to fix it when it is not, and to build one by hand only when your platform does not generate one. A short clean sitemap beats a long dirty one, every time.
What this guide covers
This guide covers the full job in order. First, you find the sitemap your platform already generates, and you confirm it loads. Second, you check what it lists, and you remove the addresses that should not be there. Third, you split it when it grows past the size limit, using a sitemap index. Fourth, you submit it, and you point crawlers at it from robots.txt. Fifth, you keep it current, and you check it after every catalog change.
Google says submitting a sitemap is only a hint, and it does not guarantee Google will download the sitemap or use it for crawling. That sentence sets the expectation for the whole guide. A sitemap is a pointer, not a promise. The work makes discovery easy, and easy discovery is what a sitemap can do.
Who does each step
Marketer work is finding the sitemap address, opening it in a browser, submitting it in Search Console, and checking the report for errors. Developer work is fixing a sitemap that lists the wrong addresses, building a sitemap by hand or by code when the platform does not generate one, splitting a large sitemap, and fixing a robots file that does not point at the sitemap. If your platform generates a clean sitemap, most of this guide is marketer work. If it does not, bring in a developer for the step that stays wrong.
Step 1: find the sitemap your platform already generates
Start by opening the sitemap your platform generates. On Shopify, it lives at your domain followed by /sitemap.xml. On WooCommerce, WordPress generates one at your domain followed by /wp-sitemap.xml. On BigCommerce, it lives at your domain followed by /xmlsitemap.php. On Wix and Squarespace, the platform generates one too, and the vendor docs linked in Sources describe where to find it. Open the address in a browser and confirm it loads as a list of addresses, not an error page.
If the address loads, you have a sitemap. If it shows an error, or a blank page, or a list that stops after a few entries, note the problem and move to step two with that problem in mind. Do not build a second sitemap by hand while the generated one is still live. Two sitemaps that disagree are worse than one sitemap that needs a fix, because crawlers will not know which list to trust. If your site has no generated sitemap at all, skip to the hand built sitemap in the machine-readable section, and have a developer generate it from your catalog, not by typing addresses one by one.
Step 2: check what it lists, and remove what should not be there
A sitemap should list only the canonical addresses you want shown in search results, with full absolute URLs. Google says to use fully qualified, absolute URLs in your sitemaps, and that it will attempt to crawl your URLs exactly as listed. That means a relative address, a test address, or an old address in the sitemap is a live instruction to crawl the wrong thing. Open the sitemap and scan it for the problems below.
First, check that your best selling products are listed, and that each product appears once, at its canonical address. Second, check that the sitemap does not list filtered or sorted views of a category, such as a category sorted by price, because those are duplicates of the same page. Third, check that it does not list the cart, the checkout, the account pages, or any page behind a login, because those pages should not be crawled. Fourth, check that it does not list pages you deleted, or pages that now redirect to another address, because a sitemap that points at dead addresses teaches crawlers to ignore it. Fifth, check that the category pages and the content pages you want cited are listed, not only the product pages, because AI systems cite guides and category pages too.
If the sitemap lists the wrong addresses, the fix depends on the cause. A product visibility setting, a category setting, or a sitemap plugin setting is usually the cause, and the fix lives in that setting. A developer can fix a sitemap that is generated by code, and a marketer can fix a sitemap that is generated by a setting. Do not hand edit a generated sitemap, because the next regeneration will overwrite your edit.
Step 3: split it when it grows past the size limit
Google says a single sitemap is limited to 50MB uncompressed or 50,000 URLs, and larger sites must split into multiple sitemaps, optionally under a sitemap index file. A sitemap index is a sitemap that lists other sitemaps, and you submit the index, not each file on its own. Most shops never reach the limit. A shop with a large catalog, with many variants, or with many pages in more than one language, can reach it sooner than the owner expects.
Split by type, not by alphabet. One sitemap for products, one for categories, one for content pages, and one for images where your platform supports it, is a split a human can read and a developer can maintain. Each file must stay under the limit, and each file must list only canonical addresses, with full absolute URLs. If you use a sitemap index, submit the index in Search Console, and confirm each file in the index loads. Google says you can submit multiple sitemaps and sitemap index files, and that splitting can help you track the search performance of each sitemap in Search Console.
Step 4: submit it, and point crawlers at it from robots.txt
Submit the sitemap in Google Search Console, using the Sitemaps report. That is a marketer step, done once, and then again whenever the sitemap address changes. Google says the Sitemaps report lets you see when Googlebot accessed the sitemap, and any processing errors. If the report shows errors, fix the cause, not the report. A sitemap that returns an error, or that lists addresses that return errors, is a sitemap that will be ignored.
Point crawlers at the sitemap from robots.txt as well. Google says you can insert a sitemap line anywhere in your robots.txt file, specifying the path to your sitemap, and that Google will find it the next time it crawls your robots file. The line is shown in the machine-readable section below. You can list more than one sitemap line, and there is no limit to the number you can include. Check the robots file in a browser after the change, and confirm the sitemap line points to the live sitemap address. If your platform generates the robots file for you, ask your developer how to add the line, and do not hand edit a generated file.
Step 5: keep it current, and check it after every catalog change
A sitemap goes stale in the same way a catalog does. A product added to the store should appear in the sitemap. A product removed from the store should leave it. A product whose address changed should appear at the new address, not the old one. If your platform generates the sitemap, regeneration should happen on its own, but confirm it did. Open the sitemap after a catalog change, and confirm the new product is listed and the removed product is gone.
Add three checks to your routine after any catalog change: open the sitemap and confirm the changed product is listed at the right address, open Search Console and confirm the Sitemaps report shows no new errors, and open the product page and confirm the price and stock are right. Google says it uses the lastmod value only if it is consistently and verifiably accurate, so do not add a lastmod value unless your build writes true modification times. Google also says it ignores priority and change frequency values, so do not add them. A sitemap that lists the right addresses, in the right form, and stays current, is the whole job.
Machine-readable version you can copy
This section gives you two copy-ready blocks, built only from fields and formats verified in the vendor docs linked in Sources. Replace the example addresses with your own, and keep every address identical to the live page.
First, an XML sitemap with two entries. The format comes from Google's sitemap guide, which shows a urlset with a url element and a loc element holding the full absolute URL. Do not add priority or change frequency values, because Google says it ignores them. Do not add a lastmod value unless your build writes true modification times.
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>https://www.example.com/products/potting-mix</loc>
</url>
<url>
<loc>https://www.example.com/guides/how-to-repot-a-plant</loc>
</url>
</urlset>
Second, the robots.txt sitemap line. Google says you can insert this line anywhere in your robots.txt file, specifying the path to your sitemap. Use your own domain and your own sitemap address in place of the example.
Sitemap: https://www.example.com/sitemap.xml
Worked example: a garden center that listed its checkout in the sitemap
Take a small garden center that sells potting mix, planters, and seeds, with a blog that answers planting questions. The owner assumed the sitemap was fine, because the platform generated it. When she opened it, she found the product pages and the blog posts, and she also found the cart, the checkout, and a set of filtered category views, each listed as a separate page. She also found three products she had deleted months earlier, still listed at their old addresses. She fixed the cause in the platform settings, removing the cart and checkout from the sitemap, and removing the deleted products. She submitted the clean sitemap in Search Console, and added the sitemap line to robots.txt. She opened the sitemap after the next catalog change, and confirmed the new planter was listed and the old one was gone. A shopper then asked an AI assistant for potting mix for repotting, and the assistant could find the product page and the repotting guide, and name the garden center. The fix was a list, not a rebuild, and it started with opening the sitemap and reading it.
Frequently Asked Questions
Do I need to build a sitemap by hand?
Usually not. Most platforms generate one for you. Find it first, open it, and check what it lists. Build one by hand only when your platform does not generate one, and have a developer generate it from your catalog, not by typing addresses one by one.
What should a sitemap list?
Only the canonical addresses you want shown in search results, with full absolute URLs. That means product pages, category pages, and content pages you want cited. It does not mean the cart, the checkout, the account pages, filtered views, or deleted products.
Does submitting a sitemap guarantee my pages will be crawled?
No. Google says submitting a sitemap is only a hint, and it does not guarantee Google will download the sitemap or use it for crawling. A sitemap makes discovery easy. It does not force it.
Should I add priority or change frequency to my sitemap?
No. Google says it ignores priority and change frequency values. Do not add them. Add a lastmod value only if your build writes true modification times, because Google says it uses the value only if it is consistently and verifiably accurate.
Verified Sources & Technical Documentation
- Google Search Central, Build and submit a sitemap Specific https://developers.google.com/search/docs/crawling-indexing/sitemaps/build-sitemap
- Google Search Central, Optimizing your website for generative AI features on Google Search Specific https://developers.google.com/search/docs/fundamentals/ai-optimization-guide
- Sitemaps protocol, Sitemaps XML format General Docs https://www.sitemaps.org/protocol.html
- BigCommerce Support, The sitemap is not detected by some SEO tools Specific https://support.bigcommerce.com/s/question/0D54O00007dXuQlSAK/the-sitemap-is-not-detected-by-some-seo-tools?language=en_US
- Schema.org, Product type General Docs https://schema.org/Product
links marked specific point to the page that supports the claim in this guide. Links marked general docs point to the vendor's general docs section for that topic, not to a page that proves every step. Check the vendor docs for the current path before relying on a menu name or click path in this guide.