Shopify Sitemap: What It Is & How to Submit One
There are lots of ways you can improve your Shopify website’s SEO.
But one of the best things you can do is leverage your sitemap. Which is especially easy if you have a Shopify website.
In this post, we’ll go over how to find and submit your Shopify sitemap. And a method to keep your sitemap updated and optimized for better search engine visibility.
Let’s start with the basics.
What Is a Sitemap & Why Does Your Shopify Store Need One?
A sitemap is a file that lists all the important pages on your website.
It acts as a directory for search engine crawlers (and for users, depending on the format) to help them easily navigate your website. And ensure they understand your website’s architecture and the relationships between the pages.
Here are the two main types of sitemaps:
- XML sitemap: A sitemap that’sused by search engine crawlers to discover pages
- HTML sitemap: A sitemap that looks like a standard webpage with all important pages listed to help users easily navigate the website
XML sitemaps provide additional information about URLs, such as when they were last updated and whether there’s an alternative version.
Here’s an XML sitemap example:
And here’s an HTML sitemap example.
HTML sitemaps can also improve your internal linking. Which contributes to your overall SEO performance.
But for most Shopify stores, the header navigation bar contains links to all important pages. Meaning there’s rarely any practical need for an HTML sitemap if you have a Shopify website.
So, we’ll focus only on XML sitemaps for the rest of this article.
Do You Need to Know How to Create a Sitemap in Shopify?
Luckily, there’s no need to dig into how to add a sitemap in Shopify. Because anyone who uses the platform already has an XML sitemap.
The Shopify platform auto-generates and modifies your XML sitemap. And also supports region-specific sitemaps for international sites.
Can You Edit Your Auto-Generated Shopify Sitemap?
Shopify-created sitemaps can’t typically be modified.
They’re automatically generated and modified based on your store’s content. And Shopify is restrictive about changing them.
You can use third-party Shopify apps to edit the existing Shopify XML sitemaps. And other external tools to create one from scratch. But we’ll get into those options later.
How to Find Your Shopify Sitemap
Your Shopify XML sitemap is in your site’s root directory.
Simply visit https://example.com/sitemap.xml in a browser to access your Shopify XML sitemap. (Just replace “example.com” with your Shopify store’s domain.)
For example, here’s clothing brand Hiut Denim’s Shopify XML sitemap:
This is the main sitemap. Which is called the parent sitemap or sitemap index. And it links to all the child sitemaps, which contain the URLs of the pages.
You can submit your sitemap index to search engines instead of submitting each separate sitemap. Because search engines can access those individual sitemaps through the links in the sitemap index.
Here’s what one of Hiut Denim’s child sitemaps looks like:
Understanding the Contents of a Shopify Sitemap
The Shopify sitemap.xml file is a sitemap index. Which contains links to your store’s other sitemaps.
It contains sitemaps for the following:
- Products (/sitemap_products_1.xml): contains URLs of all the product pages and their media
- Collections (/sitemap_collections_1.xml): contains URLs of all the collection pages and their media
- Blog posts (/sitemap_blogs_1.xml): contains URLs of all the blog posts and their media
- Pages (/sitemap_pages_1.xml): contains URLs of all other pages and their media
Each XML sitemap has a limit of 50,000 URLs. So, Shopify will automatically create additional ones if this limit is exceeded.
That means the next product sitemap would be sitemap_products_2.xml.
And here’s what a Shopify product sitemap looks like:
In the sitemap, each URL is defined by the <url> tag. Which contains the following information:
- <loc>: The location (URL) of the webpage or image file
- <lastmod>: The **** and time when the content was last modified
- <changefreq>: An indication of how often the content is likely to change (e.g., daily, weekly, etc.)
For the products sitemap, each entry also contains an <image:image> tag for the product image. It contains the following information:
- <image:loc>: The location (URL) of the product’s primary image
- <image:caption>: The product image’s caption, if present
- <image:title>: The product image’s title, if present
How to Add a Custom Sitemap to Shopify
There are a few ways to customize your sitemap.
The first is a workaround that involves creating and uploading a static Shopify XML sitemap. Then creating a 301 redirect to it from one of your webpages.
This gives you more control over which pages are included. But you have to be extremely careful to avoid leading search engine crawlers astray.
Here are some common mistakes to avoid:
- Creating a blank sitemap without any URLs
- Omitting important pages and content
- Including URLs with status codes other than 200 (i.e., redirects, 404 pages, etc.)
- Including non-canonical URLs (meaning alternative versions)
- Exceeding the sitemap limit (i.e., 50,000 URLs or 50 MB)
And ensure that the sitemap.xml is valid. Meaning it follows the sitemap protocol set by Sitemaps.org. For example, the sitemap should:
- Begin with <urlset> and end with </urlset> tags
- Specify the namespace (protocol standard)
- Contain <url> tag for each URL, with a <loc> tag inside it
You can also use apps to modify sitemaps. There are plenty of them in the Shopify App Store.
But it’s usually better to stick to the default sitemaps and settings.
Why? Because Shopify auto-updates the sitemaps regularly, keeping them up to ****. And reducing the risk of errors.
How to Submit Your Shopify Sitemap to Search Engines
Let’s go over how to submit a Shopify sitemap to Google and Bing.
Submit a Shopify Sitemap to Google
You can submit your Shopify sitemap through Google Search Console (GSC). But first, you’ll need to create a new property for your Shopify store and verify it.
To add and verify your Shopify store, start by navigating to Google Search Console.
Here, you can verify the property in two ways:
- Domain: Covers all URLs and subdomains
- URL Prefix: Covers all the URLs with the specific prefix
The URL Prefix method is easiest and most suitable for Shopify. Because all the URLs share the same prefix (e.g., https://yourdomain.com/).
In the “URL Prefix” field, enter your Shopify homepage URL and click “Continue.”
Now, you’ll need to verify the site’s ownership.
There are multiple ways to do that. For example, you can use existing Google Analytics or Tag Manager setup. But the simplest option is to add a meta tag in the Shopify store.
To do this, expand the “HTML tag” section and copy the meta tag.
Now, go to your Shopify admin. In the left-side menu, navigate to “Sales channels” > “Online Store” > “Themes.”
In the Shopify themes, click on the three dots beside the “Customize” button to open the menu. And click “Edit code.”
Open the theme.liquid file under the “Layout” drop-down menu.
Once you’re in the Shopify theme.liquid file, paste the Google search console site verification code inside the <head> tag as shown below.
And click “Save”at the top in the right corner.
Note: Making changes to your theme file can lead to serious website issues if you make mistakes. If you’re uncomfortable with this step, reach out to a developer who can help.
Now, you’ll need to return to the Google Search Console setup and verify the meta tag.
Click the “Verify” button inside the “HTML tag” section from where you copied the code.
You’ll get a confirmation message once the verification is complete. Once you’ve successfully set up your Shopify site in Google Search Console, you can see its presence on Google and track its performance.
You can now submit your sitemap by going to “Indexing” > “Sitemaps” in GSC.
Enter the sitemap address under the “Add a new sitemap” section and click “Submit.”
When your submission is successful, you’ll get this message.
Further reading: How to Submit a Sitemap to Google (in 4 Simple Steps)
Submit a Shopify Sitemap to Bing
Bing Webmaster Tools helps you understand your site’s presence on the Bing search engine.
You can submit your Shopify sitemap to Bing and help it understand your website—it tells the search engine which pages you’d like to get indexed.
For that, you’ll need a verified site.
Go to Bing Webmaster Tools and log into your account.
If you’ve already verified the site on GSC, you can import details and sitemaps directly. Otherwise, you can follow the manual verification steps below.
Enter your Shopify domain and click “Add.”
In the verification, expand the “HTML Meta Tag” section and copy the verification code.
There are other verification methods, such as adding an XML file. But the “HTML Meta Tag” option is the easiest one.
Now, follow the steps mentioned for the Google verification in the previous section on adding the meta code to the Shopify theme.liquid file. And verify the site.
Once the verification is successful, you can submit your Shopify sitemap to Bing.
Click “Sitemaps” in the left-hand menu of Bing Webmaster Tools.
In the top right corner, click “Submit sitemap.”
Enter the address of the Shopify sitemap in the pop-up window and click “Submit.”
Many merchants face the “Couldn’t fetch” error while submitting a Shopify sitemap.
If this happens, you need to check whether your site is accessible to the public (meaning it’s not protected by a password).
Simply open the sitemap URL in a private browser window to see if you can access it.
Monitoring and Updating Your Shopify Sitemap
Your Shopify sitemap plays a crucial part in your SEO performance. And keeping it up to **** and optimized for search engines is essential.
This can be challenging if you’re using custom sitemaps.
The Semrush Site Audit tool can help you find and fix all the critical issues in your sitemap.
Open the tool and follow the Site Audit configuration steps to create a project and run a site audit.
Once the audit is complete, you’ll see a high-level look of your site’s technical SEO health in the “Overview” report.
Now, click the “Issues” tab and enter “sitemap” in the search bar at the top.
The tool will now show you any sitemap-related issues. Like these:
- Sitemap.xml not found
- Sitemap.xml files have format errors
- Incorrect pages found in sitemap.xml
- Sitemap.xml files are too large
- Sitemap.xml not indicated in robots.txt
- HTTP URLs in sitemap for HTTPS
Hover over “Why and how to fix it” to learn more about an issue. And find out what steps you can take to address it.
Staying on top of any issues will help you maintain your Shopify site’s health and SEO performance.
Source link : Semrush.com