Digital Darts: Hreflang Tags App
Fix Your Shopify SEO Today
Get the Digital Darts: Hreflang Tags app from the official Shopify Apps store today:
If you have two or more Shopify stores for the same business serving different countries or languages, you may be losing traffic and sales from poor SEO.
The hreflang tag tells search engines like Google what version of the page from what store, to serve users. The tag also prevents duplicate content penalties from similar content being on multiple stores.
The SEO Challenge With Shopify
Nearly all Shopify stores do hreflang tags with a {{ canonical_url }}
value or Shopify Markets. The big SEO mistake in doing with the canonical URL is you must have the exact same collections, products, pages, blogs, blog tags, and articles in each store—all with the same URL handle—otherwise your tags will point to non-existent pages (404s).
If one store doesn’t contain all the same products, or any URL handle for a store varies between another store, standard hreflang tags in Shopify are bad for SEO. Google will crawl non-existent pages and you will lose organic traffic.
The way to historically solve this problem is to have the exact same store setup and URLs across all stores. If you have stores in different languages, that is bad for SEO, and bad for the user experience, because your URL handles should be in the same language as the store.
Grow with Digital Darts: Hreflang Tags
Your Shopify stores can now have perfect hreflang tags to increase sales from organic search.
Without the app, your customers may be taken to the wrong store when coming from Google search, which can lead to confusion in international shipping and poorer conversion rates.
By using the app, organic conversion rates may increase as visitors are served the correct store for their region and language in search results.
If you’ve previously used a universal language in your URLs across stores to deal with hreflang tags, you can now catapult SEO and improve the user experience with URL handles in the same language as the store.
Highlights
- Designed by 9-year Shopify SEO experts so you know your tags follow best practices. Works for all content types. Collections, products, pages, blogs, blog tags, and articles will be matched so stores have perfect hreflang tags.
- Integrates with Shopify’s native language translation used by most language apps like Langify, Translate My Store, and sometimes Weglot depending on your settings. Don’t make the mistake of depending on their hreflang tags for multiple stores.
- Works with Shopify’s International Domain feature where one Shopify account has multiple domains or sub-domains.
- Install the app on any store with any language whose SEO you want to optimize. If you have four Shopify accounts for a business, install it on each account.
- Automatic or manual installation of liquid. No messy code surprises. Easily roll out the app.
- Save hours of work. Products instantly map to each other based on SKUs or barcodes. Any articles, blogs, collections, and pages with the same URL handle instantly map.
- Trusted long-time standing. From the makers of the Related Blog Posts Pro app, which has been published and supported since 2015.
- Partner friendly. Contact us for support.
Frequently Asked Questions
Install the app through the Shopify marketplace for each store. Upon installing, you can go to Online Store > Themes > Customize then enable the app.
If you have other hreflang tags, they’ll need to be removed.
The fastest solution is to use our Hreflang Checker Chrome extension. This lets you quickly check hreflang tags on webpages for SEO. See what tags exist and if a page’s language code, region code, and return links match.
It does not matter whether you have sub-domains, multi-lingual folders native in Shopify, or completely different domains. The app is made to give any Shopify store the hreflang tags for good international SEO.
It’s dead-simple. Once your stores are connected, products automatically map based on SKU value. Other content types will automatically map if they have the same URL handles. For ones with no match, you manually match them like you would in a spreadsheet. Watch this example:
The app is made to solve the problem of having different products, collections, pages, blogs, blog tags, and articles between stores.
After being certified Shopify Experts and managing the SEO of Shopify clients for over 5 years, we saw the problem in Shopify with how stores talk with each other for SEO. It was non-existent. As a result, any alternative solution to do hreflang tags did damage to SEO.
The app solves the problem by syncing all content types across stores in a table-like design. This means you can tell Google, for example, that product A doesn’t exist on another store. Or if collection A has a different URL on another store due to language, the hreflang tags remain synced.
Whatever you do with redirects between stores has no effect on hreflang tags.
On redirects and serving pages, Google says:
Whatever configuration you decide to go with, you should make sure all the pages—including country and language selector pages—have rel-alternate-hreflang annotations.Google Search Central Blog
This means Google wants to see hreflang tags on your stores even if you redirect or give users the option to swap between websites. It is best practice to explicitly indicate the language and sometimes region of pages through hreflang tags to help organic SEO.
The default option in the app sets what store you want to have the x-default hreflang tag. Think of it as your catch-all store where you want people to go if they shouldn’t go to any other store. For most Shopify businesses, this is their US store.
Google says, “The new x-default hreflang attribute value signals to our algorithms that this page doesn’t target any specific language or locale and is the default page when no other page is better suited.” They recommend using the x-default feature as a fallback even though it’s not mandatory.
The app does not redirect users to follow Google best practice for users and SEO. It’s enticing to redirect shoppers to a store based on the user’s IP information. Resist the temptation. “Do not use IP analysis to adapt your content,” says Google’s documentation. “IP location analysis is difficult and generally not reliable. Furthermore, Google may not be able to crawl variations of your site properly. Most, but not all, Google crawls originate from the US, and we do not attempt to vary the location to detect site variations. Use one of the explicit methods shown here (hreflang, alternate URLs, and explicit links).”
The result of this sin is that Googlebot crawls the website then gets redirected to one version based on your redirection rules. The version Google sees will differ from what other shoppers see. When a website treats the Googlebot differently to people, the website is cloaking—a violation of webmaster guidelines.
Refer to our Shopify hreflang guide to learn what to do instead.
Go to Online Store > Themes. Select the theme you want to customize then enable the app.
You can archive a store within the app. This unpublishes hreflang tags from your account. You will still be billed with this method.
An alternative to turn off the hreflang tags is to disable the app embed.
To stop billing and remove the app altogether, all you need to do is uninstall the app from the admin.
For the ultimate resource to understand hreflang tags and fix errors in Google Search Console, ahrefs.com, Semrush, and Screaming Frog, read “How to Add Flawless Hreflang Tags in Shopify At Last“.
For help with the app, please reach out to our support by filling in the support form. Share your question(s) or issues, and share as much detail as possible to stop emails going back-and-forth. If it helps to include screenshots, you can include screenshots that are privately hosted online because attachments through the form are not possible.
Language and Regions
Click on the store that was updated from within the app, then sync the domains. The language update will be detected and the tags will begin to refresh.
Shopify has an International Domains feature that lets you use multiple domains or sub-domains on a single account. If you’re using this feature, the Digital Darts: Hreflang Tag sets the language and region based on your domain settings in Shopify. This way the hreflang tags line up with your domain region and language settings.
If there’s a language or region in one of those multi-site stores you want to change, you can do that within Shopify admin > Online Store > Domains. Then from within the app dashboard, go to the shop you edited, and click “Sync Domains” to refresh your settings.
Yes. The language follows Google’s requirement of being in ISO 639-1 format. The region also follows their requirement of being in ISO 3166-1 Alpha 2 format.
A language can differ from the region. A region can be ignored. However, a language must be specified to meet Google’s advanced SEO requirements.
Thanks to the app, you can have hreflang tags like the following in Shopify:
en
: English language content with no region
en-au
: English language content for Australian users
es-mx
: Spanish language content for Mexican users
Removing Other Bad Hreflang Tags
During the installation process, you’re asked to remove hreflang tags inserted from other apps or Shopify. This does not affect the app, but multiple hreflang tags confuses Google.
We suggest removing old hreflang tags once the app is installed in all stores. Mapping does not need to be complete. Most multi-regional and multi-lingual Shopify stores have poor hreflang tags to begin with.
Most translation apps like Langify v2, Translate My Store, and Translation Lab use Shopify’s native hreflang tags. See the FAQ on how to remove them.
Shopify inserts its hreflang tags through {{ content_for_header }}
in the theme.liquid file. You can remove Shopify’s default hreflang tags in two ways. Contact Shopify support to ask them to disable the tags on a store-by-store basis. Alternatively, place the following code before {{ content_for_header }}
:
{% assign lines = content_for_header | newline_to_br | split: '<br />' %} {% for line in lines %} {% if line contains '<link rel="alternate" hreflang' %} {% assign content_for_header = content_for_header | remove: line %} {% endif %} {% endfor %}
Remove all other hreflang tags by searching “hreflang” in the theme.liquid file. If you can’t find the tags, they may be in the snippets folder. Use the Liquify – Shopify Enhanced Code Search/Editor Chrome Extension to locate where the tags are inserted.
Getting Geeky Questions
When no language or region from the hreflang tag matches a user’s browser setting, the x-default tag lets you tell Google what page to take users to. Setting a default is best practice for when no languages match.
The app lets you set one store as the default, which uses a value of hreflang="x-default"
. Alternatively, no default can be set. Individual pages cannot be changed to a default different to the store settings.
One of the main reasons we made this app is to solve the problem of different content between stores!
If an unpublished product page was included in the hreflang tags on the same SKU of another store, it would generate a 404. That’s not good for SEO.
Any product, collection, page, article, or blog not live will not be linked to via other hreflang tags.
If you have a unique type of content on one store but no other, you can add it as a mapping (with it as the only entry) so that it has hreflang tags that point to itself. Some experts may argue this is unnecessary. Without any mapping, there are no tags on the page. If the store has multiple languages, adding the store as the only mapping adds the correct hreflang tags to it.
Pagination is a sequence of numbers for content. In ecommerce, it’s primarily a usability feature that lets people navigate between multiple pages of a product category. The alternative is to have all paginated products displayed on one page, which can cause confusion and excessive load times.
Shopify often paginates collection content. How should you best handle hreflang tags for these pages to maximize your international SEO?
If an English store has products D, E, and F on page 2, while the German version of the store has products F, G, and H on page 2, it makes sense from an SEO perspective to not point the hreflang tags on these pages to page 2 of each store. The content is different to each other. Similarly, a page 2 on one store may not exist on another, which can constantly change based on product availability. It gets messier when canonical tags come into play, and they always do in Shopify. Here’s why.
Shopify canonicalizes paginated URLs to themselves. The page /collections/all?page=2
will have a canonical tag of:
<link rel="canonical" href="https://example.com/collections/all?page=2">
Google’s John Mueller said if this happens, one of the hreflang tags should mention /collections/all?page=2
:
Make sure any rel=canonical you specify matches one of the URLs you use for the hreflang pairs. If the specified canonical URL is not a part of the hreflang pairs, then the hreflang markup will be ignored.
On the back of Mueller’s guidance, and to avoid paginated content with hreflang tags pointing to 404s, the app does not have hreflang tags on paginated pages. SEO experts agree not having hreflang tags on paginated pages with canonical tags is best. For more evidence, watch John discussing this issue in an office-hours hangout.
When it is the first paginated page, hreflang tags are included because they match the canonical URL and won’t result in any 404s. For example, the page /collections/all?page=1
has the following canonical and hreflang tags:
<link rel="canonical" href="https://example.com/collections/all"> <link rel="alternate" href="https://example.com/collections/all" hreflang="en"> <link rel="alternate" href="https://example.com/collections/alle" hreflang="de-de">
Shopify canonicalizes product variant URLs to the product URL. The page /products/product-name?variant=1234567890
 will have a canonical tag of:
<link rel="canonical" href="https://example.com/products/product-name">
Variants URLs have hreflang tags that point to the primary URL, not the variant. This is called a “non-self referencing canoncial tag”. Following Google’s advice revealed in the FAQ “How is paginated content handled?“, this is done in order that hreflang tags match the rel=canonical link.
New products and collections and their titles or URL changes sync almost instantly. Shopify APIs for products and collections make this possible. Mappings update every 10th minute of the hour.
New pages, blogs, and articles and their titles or URL changes update at 00:00 GMT. There is no Shopify API that makes instant updates possible.
If your Weglot domains are configured as sub-folders with standard region and language folder names, the app will work.
If you have unique domains or sub-domains configured in Weglot, you cannot have perfect hreflang tags between Shopify accounts. Weglot’s domain configurations are a black box. They do not use Shopify’s APIs nor do they make the data easily available. A third-party app has no idea what these settings are in Weglot.
The alternative to achieve perfect hreflang tags for good SEO is setting up your domains in Shopify Markets or open new Shopify accounts. The domain and regions can be resynced through the app to the correct settings. Shopify makes the language, regions, and domains available.
Semrush and ahrefs always give an error of “Conflicting hreflang and rel=canonical” for well-implemented hreflang tags in Shopify.
These messages are inaccurate with SEO best practices for hreflang tags. The errors occur because pages that are not the canonicalized version have hreflang tags that point to the canonicalized version.
This is the correct way to setup hreflang tags as Google’s John Mueller famously advised:
Make sure any rel=canonical you specify matches one of the URLs you use for the hreflang pairs. If the specified canonical URL is not a part of the hreflang pairs, then the hreflang markup will be ignored.
You may see a fluctuation of visibility report in Semrush or performance metrics in Google Search Console. This can happen the day the app is implemented as Google begins to correctly shuffle traffic between stores.
There are plenty of tools that will check tags on a page-by-page basis to confirm the errors reported in Semrush or ahrefs.com are false. The most reliable, comprehensive way to double-check your hreflang tags is with Screaming Frog. You can run a crawl of one of your stores then click the “Hreflang” tab at the top to see your tags.
Fix Your Shopify SEO Today
Get the Digital Darts: Hreflang Tags app from the official Shopify Apps store today: