Shopify can generate hreflang tags automatically, but in some stores the automation creates nonsensical language-country pairs, and Google ends up crawling thousands of URLs that lead nowhere. This article shows you how to check your own store and fix it. It’s written for stores selling in several languages or markets through Shopify Markets.

Where to start depends on your situation:

Thousands of odd URLs in Search Console

The symptom is easy to spot. Search Console’s page report lists thousands of URLs instead of a few hundred, with paths like /de-pl/blogs, /cs-hu/collections/bundy or /de-pl/collections/bundy. Nobody on your team created them, and you won’t find them in the Shopify admin.

These URLs come from hreflang, a tag in the page code that tells search engines which language versions a page has and who each one is for. Think of it as airport signage. If a sign points to a gate that doesn’t exist, say German for Poland, passengers and Google both end up wandering around.

The real cost is crawl budget. Google allocates each website a limited amount of crawling, meaning how many pages it opens and reads over time. When that budget goes on nonsense URLs, your valid products and categories get crawled later. It looks alarming, but the cause is a single one, and it can be traced.

What happened at BU1.cz

The Czech e-shop BU1.cz hit this problem in 2023. According to an analysis by Dominik Liebezeit, the SEO specialist who works with them, Shopify generated URLs such as bu1.cz/de-pl/blogs and bu1.cz/cs-hu/collections/bundy. None of them made sense, yet Google kept trying to open them.

The analysis gives two figures, and each measures something different:

  • Google was crawling 31,000 nonsensical URLs against 1,500 valid URLs on the e-shop. It refused to index them, and BU1.cz lost traffic as a result.
  • Over 14,000 pages carried nonsensical language-country combinations, and Google kept crawling them long after the fix.

Those combinations led to tens of thousands of 404 errors, which are links to pages that don’t exist. BU1 was still recovering in April 2024.

Why Shopify creates pairs nobody asked for

In some configurations, the automation works purely mechanically. It takes every language of the store and pairs it with every country the store sells to. Mathematicians call this a Cartesian product, but in practice it’s a table of languages × countries.

By default, Shopify sent these combinations in its hreflang tags. Google treated them as an invitation and started crawling them, which is how German for Poland and Czech for Hungary appeared.

The numbers grow quickly. A store with 4 languages and 5 countries gets 20 combinations, although perhaps only 5 of them make sense. The other 15 appear on every product, collection and article, so with 1,000 pages you end up with 15,000 pointless links.

What correct Shopify hreflang looks like

Language and country codes

An hreflang code has two parts. The first is an ISO language code, and the second is the geographic region where that language is spoken. So cs-CZ is Czech for Czechia, sk-SK is Slovak for Slovakia.

You can also use a language code on its own (cs, sk or de). That is enough for most e-shops. Add a country only where the combination makes sense. English for Slovakia, for example, does not.

A language-country combination typically pays off when you sell the same language in several countries with a different currency or price. We recommend separating German for Germany and Austria as de-DE and de-AT, so a customer in Vienna gets the version with the prices that apply to them.

x-default for everyone else

x-default is the fallback value in hreflang. It defines the version for users whose language you don’t have on the site. If an Italian-speaking customer arrives and you don’t sell in Italian, x-default shows them where to go next.

Hreflang, canonical and html lang

Canonical is a tag that defines the main version of a page when several similar URLs exist. The page hreflang points to must also be its canonical version. If hreflang points elsewhere than canonical, Google gets two contradictory instructions.

The html lang attribute serves a different purpose. Hreflang and canonical are read by search engines, while lang helps browsers and screen readers. For the wider picture of how search engines read e-shops today, see our article on AI SEO in 2026.

How to check your hreflang in 10 minutes

You need a browser and access to Search Console. Work through these steps:

  1. Open the source of any page and search for “hreflang”.
  2. Look for combinations you don’t sell, such as de-PL or cs-HU.
  3. Verify that every URL in hreflang returns status 200 and isn’t redirected.
  4. Compare each URL with the canonical of that language version.
  5. Go through the non-indexed pages in Search Console and filter by suspicious prefixes.
  6. Check that the tags aren’t on the page twice, once from the automation and once from the theme template.

Status 200 means the page responded normally. If the source shows only languages and countries you really sell and all URLs respond, you’re done. It often takes less than 10 minutes.

Don't want to deal with the technical details?

We'll check and fix hreflang for you.

Get in touch

How to fix it, step by step

A broken hreflang is worse than none

If you’re unsure your hreflang is right, switch it off temporarily. Nothing breaks, because Google infers language versions without it until you deploy a correct version.

Switching off the automatic tags

In newer versions of the Shopify admin, automatic hreflang tags are switched off in Online Store → Preferences. If you don’t see the toggle, contact Shopify support, who can switch hreflang off for you.

Switch the automation off when you move to a custom implementation. A short period with no hreflang doesn’t harm the store. Never run automatic and custom tags together, because Google then receives two sets of instructions.

Custom tags in the theme

Build custom tags dynamically from the localization object in Liquid. Liquid is Shopify’s templating language, and the localization object knows the languages and countries active in your Markets. Don’t hardcode domains or handles. A handle is the text part of a URL, such as /products/zimni-bunda (Czech for “winter jacket”), and a hardcoded handle breaks at the first change.

The principle looks roughly like this:

{%- assign current_root = request.locale.root_url -%}
{%- assign path = request.path -%}
{%- if current_root != '/' -%}
  {%- assign path = request.path | remove_first: current_root -%}
{%- endif -%}
{%- for language in localization.available_languages -%}
  {%- assign root = language.root_url -%}
  {%- if root == '/' -%}{%- assign root = '' -%}{%- endif -%}
  <link rel="alternate" hreflang="{{ language.iso_code }}" href="{{ request.origin }}{{ root }}{{ path }}">
{%- endfor -%}
<link rel="alternate" hreflang="x-default" href="{{ request.origin }}{{ path }}">

The sample generates only the languages you actually have in Markets, plus x-default. It is simplified and assumes one domain and untranslated URLs. Add language-country combinations only where you really sell them, and have a developer check the code against the current Liquid documentation before deploying.

Note: deploy first to a staging environment or an inactive copy of the theme. Publish only when the source shows only correct combinations and all URLs return status 200.

Why Google keeps crawling junk URLs for months

After the fix, Search Console may keep filling with odd URLs. Google has the nonsense URLs stored and returns to them even when nothing links to them any more. At BU1 this lingered for several months.

Expect the cleanup to take months, and be wary of anyone who promises a date. Once the tags are fixed, the impact gradually fades and your valid pages get crawled sooner.

Keeping hreflang healthy after the fix

Hreflang can break again. If you change a product handle in a translation app, Shopify does not create redirects for the language URLs, so hreflang then points to a 404. After every handle change, we recommend checking the redirects in all languages.

A manual check is enough once, but automation is more reliable in the long run. Ideally, set up a daily hreflang check, meaning a script or crawler that monitors status 200 and the match with canonical. If you’d rather not monitor it yourself, aethero can help as part of its e-shop development and support service.

When native settings aren’t enough

There are three options, from the simplest to the most demanding.

Native settings are enough

You have one domain, a few languages and untranslated URLs. Go through the checklist above, and if the source shows only correct combinations, leave the automation running.

Custom tags in the theme

This pays off when the automation generates nonsensical combinations, or when you need to separate language and country because of currency. An experienced developer can edit theme.liquid. If you don’t have one, aethero builds it as part of its custom development and apps service, including a check script.

You need specialists

Multiple domains, translated URLs or a domain migration call for specialists, as does any case where Shopify support can’t help. Errors multiply across markets, so plan your international expansion with hreflang included from the start.

With translated URLs, expect a temporary traffic drop in the first months, even with correct redirects. Google has to recrawl and rank the new URLs. For translating content and URLs, aethero uses its own tool, ae translator.

What to do today

Hreflang can be checked in one afternoon. Start with these three steps:

  1. Look in the page source and search for “hreflang”.
  2. Check the non-indexed pages in Search Console for odd prefixes.
  3. Switch off broken tags and, ideally, replace them with a correct version.

If you run multiple domains or translated URLs, or Shopify support didn’t help, aethero will look at it together with you and propose a plan for your store.

Talk to aethero