E-commerce

How to create a Google sitemap in XML format?

How to create a Google sitemap in XML format?

October 31, 2026

Are you wondering how to create a Google sitemap in XML format for your Shopify store? In short, you simply need to list the important URLs, add the expected tags, and upload it to your site. This process facilitates your catalog's exploration by robots, but you must respect the imposed XML schema and regularly update the file. A well-constructed sitemap acts as a roadmap guiding Google to your most relevant pages, reduces the wait time for indexing, and prevents exclusion errors. We will break down the reasons why a sitemap is crucial, detail each mandatory tag, explain how to select URLs, set priorities and update frequencies, and then show you how to generate, validate, place, and submit the file on Shopify. Follow this step-by-step guide to optimize your visibility.

Summary

Why does an XML sitemap help the SEO of a Shopify store?

An XML sitemap acts as a roadmap for Google's robots. It tells them which pages to explore, in what order, and how often. For a Shopify store where products, collections, and information pages multiply, the sitemap ensures that every important URL is spotted, even if the theme's internal structure changes. In addition to classic SEO optimization, the sitemap accelerates indexing and reduces the risk of new or updated pages being overlooked. Furthermore, the sitemap allows signaling temporary pages or language variants to search engines via hreflang tags, improves the discovery of multimedia files, and facilitates performance tracking via Search Console. In practice, a well-maintained file limits missing-page errors and helps Google allocate its crawl budget more effectively, which is particularly useful for stores with high product turnover.

Convert over 2,000 customers on average per month with Qstomy.

The world’s 1st Shopify AI dedicated to customer conversion

Empowering 200+ e-commerce merchants

What are the mandatory tags in a Google sitemap?

Google imposes three essential tags in each <url> : <loc> (l’URL absolue), <lastmod> (last modification date) and <changefreq> (expected update frequency). The <priority> tag is optional but recommended to indicate relative importance. The file must begin with the XML declaration <?xml version="1.0" encoding="UTF-8"?> and then wrap all URLs within <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">. Google also accepts <image:image> tags to reference images linked to each product, as well as <video:video> when it comes to demonstration videos. The file must not exceed 50 MB or 50,000 URLs; otherwise, it must be split into multiple sub-sitemaps referenced from an index sitemap. Each tag must respect UTF-8 encoding and be properly closed to avoid parsing errors.

How to identify pages to include in the sitemap?

Start by listing essential pages: homepage, collections, product pages, help pages, and contact pages. Exclude duplicate pages, internal search filters, and cart pages, as they do not provide SEO value. Shopify offers apps that automatically extract URLs from your store; you can also export the catalog from the admin and filter for relevant paths. Remember to include your blog URLs if you use it for marketing content. It is also wise to include URLs for active promotional pages (e.g., sales, seasonal campaigns) while ensuring obsolete pages are removed as soon as they are de-indexed. Use export filters to retain only URLs returning an HTTP 200 code. Remember to check custom slugs and standardize uppercase/lowercase to avoid duplicate content.

How to determine the priority of each page?

The canonical tag <priority> express, on a scale from 0.0 to 1.0, the importance you assign to each page. The homepage typically receives 1.0, collections around 0.8, product pages between 0.5 and 0.7, and legal or privacy policy pages 0.3. This weighting helps Google allocate more crawl budget to strategic pages, even if the factor is indirect. This weighting must remain logical and consistent with your marketing strategy: best-selling product pages may receive a slightly higher priority above 0.7, while less-visited blog pages can be lowered to 0.4. You can automate the priority calculation based on sales volume or conversion rate, ensuring that the most profitable pages benefit from more frequent crawling.

What update frequency should you choose for each page type?

The canonical tag <changefreq> indicates how often the content changes. For a dynamic store, choose weekly for the homepage and collections, daily for product pages that change frequently (stock, promotions) and monthly for static pages like legal notices. This indication is only a suggestion; Google ultimately decides the actual crawl rhythm. For pages with unpredictable content changes (e.g., customer reviews, Q&A), it is preferable to use the value always to indicate to Google to check regularly. Conversely, legal information pages, which rarely change, can be marked yearly. Fine-tuning these values helps optimize crawl budget and prevents Google from overloading your server with unnecessary requests.

How to automatically generate the sitemap.xml file on Shopify?

Shopify automatically creates a sitemap at the address /sitemap.xml, but it groups multiple sitemaps and does not allow you to define priorities or frequencies. For total control, use a third-party app like Shopify Sitemap Builder you export the URLs via the API and generate the file with a Python script or an online tool. Once the file is ready, upload it to the root directory of your theme using the file editor. Once the script is generated, you can schedule a cron task to rebuild the sitemap every night to incorporate new product listings and stock updates. Shopify allows file uploads via the Files API, enabling full automation without manual intervention. Be sure to update the file robots.txt to point to the new sitemap so that robots discover it immediately.

How to verify the sitemap validity before submitting it?

["The sitemap testing tool integrated into Search Console allows you to paste the file URL and obtain a detailed report indicating lines where tags are missing, incorrect encodings, or inaccessible URLs. You can also validate the file using an open source XML validator that displays the exact line number in case of an error. After each correction, rerun the test until you achieve the "OK" status. A valid sitemap eliminates error returns during indexing and ensures smooth reading by robots."]

Where to place the sitemap.xml file on your Shopify hosting?

The file must reside at the root of the domain, meaning accessible via https://your-store.com/sitemap.xml. In Shopify, you can upload it via the admin interface: « Settings » → « Files », then copy the provided link and redirect it in your robots.txt if needed. Ensure the file remains accessible without authentication. If you are using a custom domain, ensure the file is truly accessible via https and that no redirect blocks the path. You can verify access by opening the URL in an incognito browser. If issues arise, clear the theme cache and re-upload the file via the Files interface to force an update.

How to submit the sitemap to Google Search Console?

Log in to Search Console, select your property, then click on « Sitemaps ». Enter the full URL of the file (e.g. https://your-store.com/sitemap.xmland validate. Google then indicates the number of discovered URLs and flags any access issues. Once the sitemap is submitted, the Search Console shows the number of discovered URLs, any access errors (403, 404), and processing times. You can refresh the status at any time to track crawl progress. If Google reports issues, fix them quickly and use the 'Resubmit' button to speed up indexing.

What are the expected effects after submitting the sitemap?

After submission, Google begins reading the file and scheduling crawls based on the priorities and frequencies you specified. You will generally see an increase in the indexing rate of new product pages, a reduction in the time required for promotions to appear in SERPs, and ultimately, an improvement in organic traffic. The sitemap does not guarantee better rankings, but it removes technical barriers to indexing. Over the long term, a well-maintained sitemap results in fresher data in search results, especially for limited-time promotions. You will also notice a reduction in error alerts in the Search Console, as URLs removed from the catalog are automatically withdrawn from the sitemap. Finally, SEO performance tracking becomes more precise thanks to impression and click metrics provided by the console.

How does Qstomy help create and manage your XML sitemap?

Qstomy, your Shopify AI assistant, automates sitemap generation by analyzing your catalog in real time. Through native integration, it creates the file sitemap.xml with tags <priority> and <changefreq> calculated based on your sales and stock updates. Qstomy automatically places it at the domain root and sends a notification to the Search Console as soon as a change is detected, ensuring a constantly up-to-date crawl without manual intervention. Qstomy also offers a dashboard where you can view in real time the sitemap status, the latest added URLs, detected errors, and how many times Google has crawled each page. Thanks to an AI that analyzes sales trends, the system automatically adjusts the tags <priority> and <changefreq> every week, ensuring that flagship products remain prioritized. This automation eliminates the need to manually revise the file with every stock update.

What checklist should you follow before publishing your XML sitemap?

Checklist before publication

  • Complete URLs : chaque <loc> must be absolute and accessible.

  • Encodage UTF‑8 : the XML declaration must specify encoding="UTF-8".

  • Balises obligatoires : <loc>, <lastmod>, <changefreq> present for each URL.

  • Consistent Priorities : respect the hierarchy (home = 1.0, products ≈ 0.7).

  • Test de validation : use the Search Console testing tool to fix errors.

  • No Session Parameters : ensure URLs do not contain temporary parameters that create duplicate content.

  • Redirections 301 : verify that old URLs redirect correctly to new ones.

  • Reference in robots.txt : add a line Sitemap: https://your-store.com/sitemap.xml so that robots can discover it automatically.

  • Update Frequency : schedule sitemap regeneration according to your catalog update cycles.

By following these points, your sitemap will be ready to be read by Google and boost your visibility. To go further: How to drive traffic to an online store (SEO, ads, social media)? - Qstomy, Why use social media for e-commerce customer service? - Qstomy, How to use an AI chatbot to compare two products in your store? - Qstomy, Can Wix be used for an e-commerce site? - Qstomy.

To go further: How to optimize an e-commerce site for Google (step-by-step guide) - Qstomy, How does SEO work for e-commerce sites? - Qstomy.

Enzo

October 31, 2026

Convert over 2,000 customers on average per month with Qstomy.

The world’s 1st Shopify AI dedicated to customer conversion

Empowering 200+ e-commerce merchants

Subscribe to the newsletter and get a personalized e-book!

No-code solution, no technical knowledge required. AI trained on your e-shop and non-intrusive.

*Unsubscribe at any time. We do not send spam.

Subscribe to the newsletter and get a personalized e-book!

No-code solution, no technical knowledge required. AI trained on your e-shop and non-intrusive.

*Unsubscribe at any time. We do not send spam.