How to Create the Optimal E-commerce Sitemap
Updated on |By QPSoftware
An ecommerce sitemap is a file, usually sitemap.xml, that lists the URLs of your store’s category, product and content pages to help Google, Baidu and Bing find and index them. Create it with your platform or a generator, keep only canonical URLs, split it above 50,000 URLs, then submit it in Google Search Console and on Baidu’s platform.
Key takeaways
- A sitemap helps search engines discover your pages, but it does not improve rankings by itself.
- List only the canonical URLs you want in search results: categories, products and content pages.
- Google ignores the priority and change frequency tags, and uses the last modification date when it is accurate.
- Split large stores into sitemaps of 50,000 URLs at most, listed in a sitemap index; Baidu also limits each file to 10 MB.
- Reference the sitemap in robots.txt, then submit it to Google, Bing and Baidu.
Among the SEO techniques available to boost an e-commerce website, creating a sitemap is one of the simplest ways to help search engines find all your pages.
A sitemap is not mandatory, and the user experience will not be affected either way. However, for a store with hundreds or thousands of product pages, an optimal sitemap is an essential part of on-site SEO optimization.
What Is an Ecommerce Sitemap?
A sitemap is exactly what the name suggests: a map of the content on your website or online store. Google describes it as a file that gives search engines information about the pages, videos and other files of a site, and about how they relate to each other. The sitemap is not relevant to your users, but it is very useful for search engines.
Try to imagine you are traveling to a city and you want to know what to see there and how to get to these different spots. How do you do that? You need a map of the city to orient yourself, to understand where the top spots are and how to get from point A to point B. If you have a good map with you, you can easily travel around the city and locate the sites you want to visit. Without such a map, you will get lost and could miss many important spots.
Your online store can be compared to a city or, in the case of a large store, a metropolis with an extensive number of things to see. When a search engine robot visits your platform, you don’t want it to get lost. Therefore, you need to provide it with a map that explains where your pages are and how they relate to the other content of your store. To accomplish this, you need to add a sitemap to your e-commerce website.
The work of search bots is to discover content online and index this information so that the search engine can show relevant content when users type a search query. Consequently, you want to make sure that the crawler can discover the relevant content of your store; otherwise, you will not appear in the search results.
Moreover, a store easily creates many similar URLs, for the same product in several colors or for filtered versions of a category. Google recommends listing only the URL you prefer for each piece of content, so your sitemap also tells search engines which version counts.
In a nutshell, even though adding a sitemap is not mandatory, there are many reasons why having one is a good idea and why we suggest it.
Why Is a Sitemap Important for an E-commerce Site?
Sitemaps matter even more for e-commerce sites, since they may easily have thousands of pages, with new products added regularly. A sitemap keeps search engines informed of these changes.
Google lists the cases where a sitemap helps the most: a large site, a new site with few external links, or a site with a lot of rich media such as videos and images. A small site of about 500 pages or fewer, with complete internal links, may not need one. Many stores match at least one of the first cases.
First of all, it is true that in time, search engines may discover your content, but it will take time. Since your store will have new product pages added regularly, you need them to be found as soon as possible, and a sitemap helps.
The same is true every time you update a page: an accurate last modification date in the sitemap tells search engines that the content changed.
Another factor to consider is that search engines mostly rely on links to discover your pages. If you don’t have a well-planned internal link strategy or enough backlinks, your content may go unnoticed for a long time. This is an additional reason to implement an XML sitemap.
Consider the images and videos of your store as well: image and video sitemaps help search engines find media they might otherwise miss.
Keep your expectations realistic, though. A sitemap is a hint, not an order: Google says that submitting one does not guarantee that it will crawl the URLs it lists, and Baidu states that a sitemap has no relation to search rankings. A sitemap makes the indexing of your content faster and more complete; your rankings depend on the pages themselves.
Which Types of Sitemaps Can a Store Use?
There are different types of sitemaps that you can implement on your store, and each one serves a different purpose. Depending on the structure of your website, or on the content you want to rank well, you may implement all of them or only some.
HTML Sitemap
This kind of sitemap is the only one created for users, who can access it from a link on the website. You can see an example on the Apple site map, where Apple has created a table of contents to help users locate the content on its website. HTML sitemaps are usually implemented by large websites.

XML Sitemap
The XML sitemap should always be added to your store. This sitemap is designed for search engines, so it is written in a machine-readable format.
It lists the URLs of your online shop that you want to appear in search results, and it can tell search engines when each page last changed.
Image, Video and News Sitemaps
Google also reads extensions of the XML sitemap for media and news:
- Image sitemaps list images that search engines might not otherwise find, such as images loaded with JavaScript. Google now reads only the location of each image: it removed the caption, title, geographic location and license tags from its documentation.
- Video sitemaps describe the videos hosted on your pages. Each entry needs a thumbnail, a title, a description, and the URL of the video file or of its player.
- News sitemaps are for a news section: Google asks you to include only articles created in the last two days, with up to 1,000 news entries per sitemap.
What About Mobile Sitemaps?
Mobile sitemaps were designed for feature phones, which did not have a full-fledged browser and used WAP, WML or something similar. Google retired its feature-phone crawler and the feature-phone sitemap extensions in November 2016, so a store does not need one today: smartphones use the same sitemaps as desktop browsers.
What Does an Ecommerce Sitemap Example Look Like?
As we mentioned earlier, the sitemap contains a list of the URLs of your store. Thanks to the XML format, it can also give search engines additional information about each page. Here is how an XML sitemap looks in a browser:

Each <url> tag lists one page. Inside it, the <loc> tag gives the canonical URL of the page, and the <lastmod> tag the date of its last significant change. Two other tags exist, <changefreq> for how often the page changes and <priority> for its importance compared with other pages, but Google ignores both. Baidu reads update information as a reference for its crawler.
For a store, a simple example lists a category page, then a product page with its main image:
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
xmlns:image="http://www.google.com/schemas/sitemap-image/1.1">
<url>
<loc>https://www.example.com/women/dresses</loc>
<lastmod>2026-09-01</lastmod>
</url>
<url>
<loc>https://www.example.com/women/dresses/red-silk-dress</loc>
<lastmod>2026-09-15</lastmod>
<image:image>
<image:loc>https://www.example.com/images/red-silk-dress.jpg</image:loc>
</image:image>
</url>
</urlset>
What to include: the home page, category and subcategory pages, product pages, and content pages such as buying guides or blog articles. What to leave out: cart, checkout and account pages, internal search results, and filtered or sorted versions of the same category, since your sitemap should only list the URLs you want to see in search results.
How to Create an Ecommerce Sitemap Manually
Creating a sitemap may sound daunting, like something only a tech wizard would do. In reality, it is not difficult, and it can be done either manually or with tools that automate the process. These are the steps to follow to create an XML sitemap manually.
- Review the structure of your store. Understand how your pages are organized, for example with one of the sitemap templates available online. You will end up with a schema similar to this one:

- Organize the hierarchy. With the template, you can easily see which pages are the most important, which ones are not easily reachable from the home page and, in some cases, which ones you do not want to be indexed. You may need to reorganize some content to create a logical hierarchy. Keep in mind that pages that require more than three clicks to be reached from the home page may be more difficult to rank.
- List your URLs. Use a software tool like Screaming Frog to create a list of all the URLs of your store.
- Write the XML file. In a text editor like Sublime Text, start with the
<urlset>tag and its namespace, add one<url>entry per page with its<loc>and<lastmod>tags, as in the example above, and close the file with</urlset>. Use full, absolute URLs and save the file in UTF-8 as sitemap.xml. - Validate your code. This is an important step, because a sitemap with errors will not work. Check the file with a tool like XML Sitemap Validator; if any errors show up, correct them and validate the sitemap again.
How Do E-commerce Platforms Generate Sitemaps?
Most e-commerce platforms create the sitemap for you, which is the easiest way to keep it up to date as products come and go:
| Platform | How the sitemap is generated | Source |
|---|---|---|
| Adobe Commerce (Magento) | Built in, under Marketing > SEO & Search > Site Map, with automatic generation on a schedule and an option to add the sitemap to robots.txt | Adobe documentation |
| PrestaShop | The native Google sitemap module generates the XML sitemap of the shop and keeps it up to date | Google sitemap module |
| Shopify | An automatic sitemap.xml at the root of the store, with products, collections, pages and blog posts | Shopify Help Center |
| WordPress | Since version 5.5, a sitemap index at /wp-sitemap.xml for public post types and taxonomies; SEO plugins such as Yoast can replace it | WordPress announcement |
| Drupal | Contributed modules such as Simple XML sitemap, with multilingual and image sitemaps | Simple XML sitemap |
If you build your China e-commerce website on one of these platforms, set up the sitemap before launch, so that your products are listed from day one. For Drupal websites, our guide to Drupal SEO in 11 steps covers the sitemap modules in its fourth step.
Which Sitemap Generator Tools Can You Use?
If your platform does not create a sitemap, or if you want more control, several tools can generate your sitemap automatically.
Yoast SEO Plugin
This is one of the most popular SEO plugins for WordPress websites. Yoast SEO generates your sitemap and updates it automatically as you add or remove content.
Google XML Sitemaps
This is another plugin for WordPress. Google XML Sitemaps generates the sitemap automatically and updates it every time you modify your content.
XML Sitemap Generator
This is a free online tool that creates your sitemap. All you have to do is type your website’s URL, and XML Sitemap Generator will scan your website and generate a sitemap of up to 500 pages.
Screaming Frog
This desktop software offers many SEO features, including sitemap generation. Screaming Frog SEO Spider crawls up to 500 URLs for free; for larger sites, you have to upgrade to the paid version. It lets you choose which pages go into the sitemap.
Slickplan
Slickplan is a paid tool, with a 14-day free trial, that works very nicely for planning. You start from a sitemap template where you can check the structure of your store, move pages around with drag and drop to change the hierarchy, then export Google-compatible XML sitemap files.
Ecommerce Sitemap Best Practices
- List only canonical URLs that you want in search results, and leave out duplicates, filters, cart, checkout and account pages.
- Use absolute URLs and UTF-8 encoding, as Google requires.
- Keep the last modification date accurate: change it only when the content of the page really changes.
- Split large stores into several sitemaps. One sitemap can hold 50,000 URLs and 50 MB uncompressed at most for Google, and 50,000 URLs and 10 MB for Baidu. Group your sitemaps, for example products, categories and content, in a sitemap index file.
- Update the sitemap automatically when products are added or removed, with your platform or a plugin.
- Reference it in robots.txt and submit it to Google, Bing and Baidu, then check their reports for errors.
For a large store, the sitemap index follows the same protocol:
<?xml version="1.0" encoding="UTF-8"?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<sitemap>
<loc>https://www.example.com/sitemap-products.xml</loc>
<lastmod>2026-09-15</lastmod>
</sitemap>
<sitemap>
<loc>https://www.example.com/sitemap-categories.xml</loc>
</sitemap>
</sitemapindex>
Where Should You Place Your Sitemap?
Now that your sitemap is ready, add the file to the root of your website, so that it is located at yoursite.com/sitemap.xml. Google recommends the root because a sitemap posted there covers all the files of the site. You can ask a developer to do that, or you can add it through FTP.
Then, add a link to it in your robots.txt file. This simple text file gives instructions to the robots visiting your website and tells them where the sitemap is located. This is the line to add:
Sitemap: https://www.example.com/sitemap.xml
How to Submit Your Sitemap to Google, Bing and Baidu
The last step is to submit your sitemap to search engines.
- Google: verify your website in Google Search Console if you have not already, then enter the sitemap URL in its Sitemaps report. Google also finds the sitemap through the robots.txt line above.
- Bing: open an account with Bing Webmaster Tools, verify your website, then follow the instructions to submit your sitemap.
- Baidu: for Chinese search, submit the sitemap on the Baidu Search Resource Platform, which accepts XML and text sitemaps. Baidu usually starts processing a sitemap within an hour, but it does not guarantee that every URL will be crawled and indexed. Our Baidu SEO guide explains the rest of the work.
From time to time, check that your sitemap is being crawled regularly and that the reports show no errors. If you don’t use a platform or a plugin that updates your sitemap automatically, do not forget to update it and submit it again each time you add products or content.
What Should You Do Next?
Creating an optimal sitemap for your e-commerce website is not difficult. It doesn’t take much time, and it helps search engines find and index your products faster. A sitemap is one part of technical SEO, next to page speed, structure and internal links.
If you still have questions about your sitemap or if you need help in creating one, our on-site optimization services include XML sitemaps along with the rest of your store’s technical SEO. You can also contact us, and we will be happy to help you.
Frequently Asked Questions
What should an ecommerce sitemap include?
It should include the pages you want in search results: the home page, category and subcategory pages, product pages, and content pages such as guides or blog articles, each with its canonical URL. Leave out cart, checkout and account pages, internal search results, and filtered or sorted duplicates of your categories. Add image entries when product images matter for search.
Does a sitemap improve SEO rankings?
Not directly. A sitemap helps search engines discover and index your pages, especially new products and pages with few internal links. Google treats it as a hint and does not guarantee crawling, and Baidu states that a sitemap has no relation to search rankings. Rankings depend on the pages themselves: their content, structure, speed and links.
How do I generate a sitemap in PrestaShop?
Use the Google sitemap module, a native PrestaShop module that generates the XML sitemap of your shop and keeps it up to date. Once the sitemap exists, add its URL to your robots.txt file and submit it in Google Search Console, Bing Webmaster Tools and, for China, the Baidu Search Resource Platform.
How many URLs can a sitemap contain?
A single sitemap can contain up to 50,000 URLs. Google also limits the file to 50 MB uncompressed, and Baidu to 10 MB. Above these limits, split your URLs into several sitemaps, for example products, categories and content, and list them in a sitemap index file, which you can submit instead of each sitemap.



