Beginner’s guide for Shopify sitemap

You’ve probably already known what a sitemap is. But in case you don’t know, this is the definition of sitemap according to Google:

Definition of sitemap

“A sitemap is a file where you provide information about the pages, videos, and other files on your site, and the relationships between them. Search engines like Google read this file to crawl your site more efficiently. A sitemap tells Google which pages and files you think are important in your site and also provides valuable information about these files. For example, when the page was last updated and any alternate language versions of the page.”

And why do I need it?

There are various reasons why you need a sitemap.


Googlebot crawls your website by following the internal link structure as well as the external link to your website. If your store is fairly new and there are no website links to it, it might take a while for Google to index your site. 

In this case, having a sitemap will tell Google that “my site exists, here is the list of pages on my site, please crawl and index it”, consequently making the Googlebot job a lot easier.

According to Google, a sitemap might be the most beneficial for your store if:

  • Your site is really large.
  • Your site has a large archive of content pages that are isolated or not well linked to each other.
  • Your site is new and has few external links to it.
  • Your site has a lot of rich media content (video, images) or is shown in Google News. If provided, Google can take additional information from sitemaps into account for search, where appropriate.

This is true, but it does not necessarily mean that sitemap might do no good for your store. In reality, even if you have a really strong linking strategy or your site is relatively small, there’s absolutely no reason for your store to not have one.

Note: There are two types of sitemaps: XML sitemaps and HTML sitemaps. Your sitemaps file format depends on the theme that you’re using. In the scope of this article, we only cover information about XML sitemaps.

Shopify sitemap structure

A basic XML sitemap would look like this:

<urlset xmlns=”″ xmlns:image=”″>











<image:title>Add mega menu to Shopify store</image:title>

<image:caption>Add mega menu to Shopify store</image:caption>




So what’s the meaning of all these tags? Let’s dive in!

XML tag definition

<urlset>requiredEncapsulates the file and references the current protocol standard.
<url>requiredParent tag for each URL entry. The remaining tags are children of this tag.
<loc>requiredURL of the page. This URL must begin with the protocol (such as HTTP) and end with a trailing slash if your web server requires it. This value must be less than 2,048 characters.
<lastmod>optionalThe date of the last modification of the file. This date should be in W3C Datetime format. This format allows you to omit the time portion if desired, and use YYYY-MM-DD.

Note that this tag is separate from the If-Modified-Since (304) header the server can return, and search engines may use the information from both sources differently.
<changefreq>optionalHow frequently the page is likely to change. This value provides general information to search engines and may not correlate exactly to how often they crawl the page. Valid values are:


The value “always” should be used to describe documents that change each time they are accessed. The value “never” should be used to describe archived URLs.

Please note that the value of this tag is considered a hint and not a command. Even though search engine crawlers may consider this information when making decisions, they may crawl pages marked “hourly” less frequently than that, and they may crawl pages marked “yearly” more frequently than that. Crawlers may periodically crawl pages marked “never” so that they can handle unexpected changes to those pages.
<priority>optionalThe priority of this URL relative to other URLs on your site. Valid values range from 0.0 to 1.0. This value does not affect how your pages are compared to pages on other sites—it only lets the search engines know which pages you deem most important for the crawlers.

The default priority of a page is 0.5.

Please note that the priority you assign to a page is not likely to influence the position of your URLs in a search engine’s result pages. Search engines may use this information when selecting between URLs on the same site, so you can use this tag to increase the likelihood that your most important pages are present in a search index.

Also, please note that assigning a high priority to all of the URLs on your site is not likely to help you. Since the priority is relative, it is only used to select between URLs on your site.

Image tag

If your images are coded in a crawler-friendly way and the pages they’re on are easily discoverable and crawlable, too, you really don’t need an image sitemap.

However, if there are images on your page that are lazy-loaded in a way that crawlers cannot see. This should be a good case where you should apply an image tag to your sitemap.

For example, the image only shows up when the customers hover on a button.

Google bot cannot find these images, so it’s necessary to include image sitemaps.

<image:image>YesEncloses all information about a single image. Each <url> tag can contain up to 1,000 <image:image> tags.
<image:loc>YesThe URL of the image.
In some cases, the image URL may not be on the same domain as your main site. This is fine, as long as both domains are verified in Search Console. If, for example, you use a content delivery network such as Google Sites to host your images, make sure that the hosting site is verified in Search Console. In addition, make sure that your robots.txt file doesn’t disallow the crawling of any content you want to be indexed.
<image:caption>OptionalA caption for the image.
<image:geo_location>OptionalThe geographic location of the image. For example, <image:geo_location>Limerick,Ireland</image:geo_location>.
<image:title>OptionalThe title of the image.
<image:license>OptionalA URL to the license of the image. You can use image metadata instead if you like.

Where to find the Shopify sitemap:

Sitemap files are generated automatically. You can find them at the root directory of your Shopify store’s domains, such as

How to create and add your own sitemap to your Shopify site:

Since you cannot edit the robots.txt file in Shopify, the sitemap won’t be linked from there, however, it does mean you can upload the sitemap to Search Console to track the performance on URLs and improve the crawling of these URLs.

How to create your own sitemap:

You can create your sitemap manually. However, if your store has too many pages, I recommend you use this tool to generate a sitemap.

Step 1: Go to the link I provide, submit your store’s URL and click Start

Step 2: Wait a couple of minutes

Step 3: Click view sitemap details

Step 4: Click Download your XML sitemap

3.2. How to add your own sitemap to your Shopify site:

Step 1: Upload the file you just downloaded to Shopify as a File.

Go to Shopify admin dashboard -> Settings -> Files -> Upload files then choose the Sitemap you just generated

Step 2: Create a redirect from the new XML sitemap URL

From Shopify admin dashboard, go to Online Store>Navigation>URL Redirects>Create URL Redirect

Redirect from: in this field, you just type in any page that doesn’t exist
For example: /this-page-does-not-exist

Redirect to: in this field, you copy the link of the XML sitemap you’ve just uploaded to the Shopify CDN and paste it here.

How to verify your site and upload your sitemap file to Google search console:

How to verify your site:

Before you submit your sitemap, you need to verify your domain with Google Search Console to confirm that you’re the owner of your Shopify store

Step 1: From your Google Search Console account, click ≡ and then select Add property from the drop-down menu.

Step 2: On the Select property type dialogue box, select URL prefix and then enter the domain you want to add as property, including the https://.

Step 3: Click Continue.

Step 4: On the Verify ownership window, select HTML tag. Or if you’re familiar with other verification methods, choose your preferred method. Learn more about verifying ownership with a TXT record.

Step 5: Highlight the full HTML tag and copy it to your clipboard with cmd + c on a Mac or ctrl + c on a PC. Make sure you select everything, including the < and >. For example:

<meta name=”google-site-verification” content=”IV7BPLESttSpBdxSWN1s4zlr4HIcuHkGQYmE3wLG59w” />

Step 6: From your Shopify admin, go to Online Store > Themes.

Step 7: Find the theme you want to edit, and then click Actions > Edit code.

Step 8: In the Layout section, click theme.liquid.

Step 9: Paste the meta tag that you copied in step 5 on a blank line directly below the opening <head> tag:

Step 10: Click Save.

Step 11: Return to Google Search Console and click Verify.

How to upload your sitemap file to Google search console:

Step 1: After your site is verified, go to Google Search Console.

Step 2: Click Sitemaps.

Step 3: In the Add a new sitemap section, enter your domain’s sitemap file name and then click SUBMIT. Your domain’s sitemap needs to have a format similar to If you don’t include all of the sitemap URLs, then you might receive an error message from Google.

Some common problems and solutions:

Google Search Console: “Couldn’t Fetch” Error

Most time, the occurrence of this error is because of a bug in the Google Search Console. But to make sure it’s not a Google Search Console bug. Check 2 things below first:

  • This error may occur if you submitted your sitemap URL incorrectly => Check to see that the URL path in the sitemap field on the left does indeed say “/sitemap.xml” and not the page URL (e.g., “/homepage”). If it was submitted incorrectly, go ahead and submit it again.

Make sure your XML sitemap has the proper format by submitting your sitemap to this tool

If the sitemap URL and sitemap structure are correct, in most cases, it resolves itself within a couple of days or weeks. However, you can submit the URL using the Inspection Tool to speed up the process.

Indexed, not submitted in sitemap

There are 2 cases:

  • You are missing some URLs in your XML sitemap. If that’s the case then you need to investigate what URLs Google’s reporting to be missing and update it to your XML sitemap.
  • The site Google reports to be missing actually is inside of your XML sitemap. If this is the case then it’s probably due to a bug with Shopify. There’s actually no solution for this. Shopify really needs to change the way they produce product sitemaps.


A sitemap is important especially for Shopify stores as store owners tend to update their store with new products or pages regularly.

If you need any help with submitting or making changes to your XML sitemap, we can help you with that. HappyPoints is a team of certified Shopify experts who have delivered 1000+ tasks worldwide with development and marketing solutions.

We’re offering a free SEO project so that you can experience our expertise and professionalism in working and communicating. We want to enhance your confidence and reliability before you decide to walk through a long Shopify SEO journey with us. There are limited slots so you might want to sign-up early. Feel free to learn more about the free SEO project here.