zaDojo

Shopify sitemap and robots.txt: find and edit them

Where to find your Shopify sitemap, how to submit it to Google, why pages go missing from it, and how to edit robots.txt safely with robots.txt.liquid.

By Denis Veisllari

Your Shopify sitemap is at yourstore.com/sitemap.xml and your robots file is at yourstore.com/robots.txt. Shopify creates and updates both automatically. You cannot edit the sitemap directly, but you can choose what goes in it, and you can edit robots.txt through a theme template. Most stores should submit the sitemap to Google Search Console and leave robots.txt as it is.

This guide shows where both files live, how to fix pages missing from the sitemap, and when editing robots.txt makes sense. It is part of the SEO for Shopify guide, and both files are in the setup and technical sections of the Shopify SEO checklist.

Finding the sitemap

Open /sitemap.xml on your primary domain. It is a sitemap index: a short file that links to separate sitemaps for products, collections, pages and blog posts. Shopify adds and removes URLs as you publish, hide or delete things.

Use your primary domain. If your store also answers on yourstore.myshopify.com or a secondary domain, those redirect to the primary one, and so does their sitemap.

If you sell in several countries with Shopify Markets and use subfolders or separate domains, each market version has its own sitemap, for example /en-ca/sitemap.xml.

Submitting it to Google

  1. Add your store's primary domain as a property in Google Search Console.
  2. Open Sitemaps, enter sitemap.xml and click Submit.
  3. Check back after a few days. The report shows how many URLs Google discovered.

You only submit once. Google rereads the sitemap regularly, and Shopify keeps it current. Do the same in Bing Webmaster Tools, which can import your Search Console setup.

Why a page is missing from the sitemap

Shopify only lists pages that are live on your online store. Check these in order:

  • The store is password protected. While the storefront password is on, search engines cannot crawl the store at all. Remove it before launch.
  • The product is not available on the Online Store sales channel. Products only in other channels, such as a POS or a marketplace, are left out.
  • It is a draft or unpublished. Drafts and pages with a future publish date are not listed until they go live.
  • It is hidden from search. Some apps and themes set a seo.hidden metafield to keep a page out of the sitemap and add a noindex tag. Check whether one you installed did this on purpose.

Pages being in the sitemap does not mean they are indexed. Search Console's Pages report shows which listed URLs Google chose not to index and why.

The default robots.txt

Shopify's default robots.txt blocks pages that should never be in search results: the admin, cart, checkout, customer accounts, internal search results, and collection URLs with sort and filter parameters that would otherwise create thousands of near-duplicate pages. It also points crawlers to your sitemap.

The defaults are sensible. Shopify updates them over time, which is a good reason not to replace them wholesale.

Editing robots.txt

You can customize the file with a theme template called robots.txt.liquid:

  1. Go to Online Store > Themes, open the menu on your live theme and choose Edit code.
  2. Under Templates, choose Add a new template, pick robots and create it.
  3. The new template reproduces Shopify's default rules with Liquid. Add your changes around those rules rather than deleting them.

Common reasons to edit it:

  • Blocking a crawler you do not want, such as a specific AI training bot. Think before blocking AI search crawlers like OAI-SearchBot or PerplexityBot, since that keeps you out of their answers. The guide to ranking in ChatGPT covers which bots do what.
  • Blocking internal URLs an app creates that are showing up in search.

Reasons not to:

  • To remove a page from Google. robots.txt stops crawling, not indexing, and a blocked page can still appear with no description. Use a noindex tag, or delete the page with a redirect (see Shopify redirects).
  • To hide duplicate collection paths. Shopify's canonical tags already handle those.

Because the template lives in the theme, it applies to the live theme only. If you switch themes, copy robots.txt.liquid across or it reverts to the default.

Checking your setup

A site audit will flag sitemap URLs that redirect or return errors, pages blocked by robots.txt, and pages that are missing from the sitemap. zaDojo's site audit does this for Shopify stores and supports Shopify's crawler access signatures so the crawl is not cut short. The main Shopify guide explains the setup.

Questions people ask

Can I edit the Shopify sitemap? Not directly. You control it by publishing, unpublishing or hiding pages. Shopify rewrites the file automatically.

Can I add a custom page to the sitemap? Pages you create in Online Store > Pages are added automatically. URLs served by apps under /apps/ are not, because Shopify does not generate them.

How long until Google reads my sitemap? Usually a few days after submission, sometimes longer for a new store. Submitting does not guarantee every URL gets indexed.