Hreflang Tags: How to Get the Attribute (Mostly) Right in Implementation 

Hreflang Tags: How to Get the Attribute (Mostly) Right in Implementation 

Dylan Jones
Director of SEO


October 21, 2025

Even the most seasoned SEO professionals can find hreflang tags challenging. Google’s John Mueller once called the tags, “…one of the most complex aspects of SEO (if not the most complex one).” 

It’s not only that the concept itself is difficult, but its implementation also demands absolute precision. A single broken link or incorrect country code can invalidate your entire effort, leaving your international users with a frustrating experience.

Getting it right, however, is a non-negotiable cornerstone of any successful international or multi-language SEO strategy, ensuring the right content reaches the right audience.

Need help with your International SEO?

What Does the Hreflang Attribute Actually Do?

At its core, hreflang in SEO is a signal that helps search engine crawlers understand when you have alternate versions of a page for different audiences in different languages. 

For example, you may have separate pages for:

  • English speakers in the US vs. the UK, with localization to ensure appropriate word spelling and cultural references.
  • Users who see prices in US dollars, UK pounds, Canadian dollars, or Mexican pesos.

Without this clarity, Google might see your nearly identical US and UK pages and flag them as duplicate content or serve your US version to users in the UK. This can lead to keyword cannibalization, where your own pages compete against each other in search results, and can dilute your ranking signals by splitting them across multiple URLs.

Crucially, hreflang is used primarily to swap URLs, not to boost Google rankings. When your page earns a spot in search results, Google performs a final check to see if an alternate version would be more relevant to the user’s language and location, and then swaps it in if needed. 

This happens just before the search results are displayed. If the tags are set up incorrectly, this swap fails, and search engines can simply ignore them.

Hreflang vs Canonicals

Another important aspect to note is that hreflang tags are not the same as canonical tags, and they aren’t interchangeable. 

An hreflang tag tells search engines that a specific page should be displayed on SERPs for users of a certain language and location. A canonical tag tells search engines to index a specific page instead of others that have similar or duplicate content. 

These two tags should be used in tandem: an hreflang tag that clusters a group of alternate page versions, and self-referential canonical tags on each of those pages to tell Google to index each variation for users, but only show the correct language and country combination.

The Anatomy of an Hreflang Tag

Let’s break down what an hreflang tag is and how to use the tag for SEO: 

<link rel=”alternate” href=”https://example.com/en-us” hreflang=”en-us” />

  • rel=”alternate”: Tells the browser this is one of the potential versions of the page. 
  • href=”URL”: The full, absolute URL of the alternate page. Using a relative URL (like “/en-us”) will break the tag. This URL must point to a live, indexable page.
  • hreflang=”language-country”: Specifies the target language (using two-letter ISO 639-1 codes) and, optionally, the country (using ISO 3166-1 Alpha 2 codes). You can target a language broadly (e.g., “en” for all English speakers) or a specific region (e.g., “en-us” for English speakers in the US).
  • hreflang=”x-default”: This is your strategic fallback. It tells Google which page to show when no other tag matches the user’s location or language. You can set this to your highest-authority page (often the US English version) or, preferably, a dedicated country-selector page to give users a choice.

How to Implement Hreflang (The Smart Way)

You have three options for implementing the tag, but one is the clear winner for scalability and maintenance:

  • HTML <head>: In the method most SEOs know, an hreflang cluster is placed as HTML code in the tag of every version of the page.
    • Placing tags on every page is easy for a few pages, but quickly becomes a maintenance nightmare. Every time you add a new country version, you must update the code on every other page in that cluster, creating numerous opportunities for human error. This additional code can lead to code bloat, potentially slowing page load times.
  • XML Sitemap: In the recommended approach, you add hreflang information to your existing XML sitemap, or create an entirely separate XML sitemap for your hreflang clusters.
    • This method centralizes all the logic in one place, keeping your page code clean and easier to manage without affecting page speed. The drawback with this approach is that it can be a bit more technically complex up front and doesn’t make as much sense for smaller websites.
  • HTTP Headers: This method is quite niche as it’s only used for non-HTML content like PDFs and requires technical server access.

The Rules You Can’t Afford to Break

To ensure Google understands and trusts your tags, follow these rules without exception:

  1. Reciprocity: If Page A links to Page B, Page B must link back to Page A. Think of this as a digital handshake. It’s a verification mechanism that proves to Google you have control over both pages, and they agree on their relationship. Without this two-way confirmation, the connection is considered broken.
  2. Self-Reference: Every page needs an hreflang tag that points back to its own URL. This acts as an anchor, clearly establishing that page’s role within the interconnected “cluster” of international pages.
  3. Absolute URLs: All links in the hreflang tag must be the absolute version and include the delivery method. This means you need to reference full URLs (ex. https://www.example.com/en/test), not the relative versions (ex. /en/test or example.com/en/test) 

Most Hreflang Implementations Are a Mess

At the end of the day, hreflang tags are a suggestion, not a directive for Google. This means that they can be ignored, even if everything is correct. However, most implementations aren’t fully correct, making it pretty easy for Google to ignore them. 

A 2023 Ahrefs study found that a shocking 67% of domains using hreflang have at least one issue. This doesn’t even count the websites that should be using hreflang but aren’t. When hreflang fails, you face signal dilution, wasted development effort, and failed URL swapping; the very problems you were trying to solve. 

The most common mistakes are surprisingly simple, yet devastating to your setup:

  • Missing the x-default tag (56.3% of domains), leaving a gap for international users without a match.
  • Missing a self-referencing tag (18%), leaving pages unanchored within their cluster.
  • Pointing to a broken or redirected page (16.9%), which sends crawlers to a dead end.
  • Missing the reciprocal tag (15.3%), breaking the chain of trust, and often invalidating the entire cluster.
  • Pointing to a non-canonical URL (8%), which sends confusing and conflicting signals to Google.

Final Takeaways

As you embark on implementing hreflang tags, be sure to remember these key points:

  1. Most hreflang is broken. Assume your site has issues until a thorough audit proves you wrong. Don’t just set it and forget it.
  2. Hreflang’s job is to swap URLs. Its failure directly results in a frustrating experience for your international users and can lead to lost conversions.
  3. Use XML sitemaps. Save your future self the headache of untangling a web of HTML tags. It is the most robust and error-resistant method.
  4. Audit regularly. Developer updates, CMS changes, or simple human error can easily break your implementation without warning. Make hreflang checks a routine part of your technical SEO process. Tools like Screaming Frog, Ahrefs, and SEMrush can help you spot the top errors quickly.

Hreflang Implementation with Greenlane Marketing

We hope this blog cleared up some confusion around hreflang for you, but we’re here to help if needed.

We’ve helped both international and domestic businesses improve their existing setups and those that began their international expansion. 

Whether you are just looking to sell in Canada or you’re looking further overseas, Greenlane’s technical SEO specialists can help make sure you don’t become a part of the 67% in the next industry study. Explore our Technical SEO Services today.

Dylan Jones headshot.

Dylan Jones

Director of SEO

Dylan leads the SEO team at Greenlane. His work runs from strategy guidance, to the technical end (hreflang, schema, marketplace SEO, tracking), to the monthly Greenlane Index, where he tracks what’s actually moving in search. In the field since 2016.

In the field since
2016
Expertise
AI Search Optimization
Technical SEO
Marketplace SEO
SEO Training
Tracking Management
Industries
B2B SaaS
E-commerce / Retail
Education
Industrials / Manufacturing
Medical / Healthcare
Published
LinkedIn

When not working, you’ll probably find Dylan at the hockey rink, watching Seattle sports teams, or nerding out about professional wrestling.

Latest Articles

Greenlane Index: October 2026

October made one thing clear: the money is following AI into search. It also made measurement harder.

AI | Analytics

Read More

Dylan Jones
Director of SEO

Greenlane Index: September 2026

September made the direction of search hard to ignore. AIOs now cover more of the results page, more of People Also Ask, and even business listings.

AI | Analytics

Read More

Dylan Jones
Director of SEO

Greenlane Index: August 2026

If there’s a thread running through this month, it’s that the “black box” framing of AI search may be starting to crack open.

AI | Analytics

Read More

Dylan Jones
Director of SEO

Introducing our AI Brand Perception Analysis

We’ve developed a new analysis that explores the way Large Language Models (LLMs) discover information about your brand.

AI | Digital Marketing

Read More

Adam Wells
Senior SEO Account Manager 

Why Your Brand Needs an Off-Site / PR Strategy, Thanks to AI

The number of people who land on your carefully optimized page is shrinking. People are forming an opinion about you based on third-party sources.

AI | Branding

Read More

Jenn Villa
SEO Account Manager – Content Strategist SME

Greenlane Index: July 2026

May was Google’s month with I/O announcements and a Core Update. June was the month the industry started seeing the impact.

AI | Analytics

Read More

Dylan Jones
Director of SEO

Latest Case Studies

Content Optimization Efforts Lead To 155 YOY Engagement Rate Increase

Product category page optimization nets incremental SEO sessions, users and engagement rate.

Paid Social Audience Restructure Doubled MQLs and Reduced CPL by 30%

This client originally partnered with Greenlane for SEO support but quickly found they were also in need of paid advertising improvements as they struggled to land marketing qualified leads (MQLs) and opportunities from their paid social campaigns.

Tech SEO Strategy Tackles Index Bloat

A billion-dollar global information and publishing company noticed a heavy decline in their natural search traffic for a specific piece of their business.

SEO & Content Strategy lead to 77% MoM Pageview Increase

Dog Health Guide boosted incremental session, pageview, and ranking growth for leader in online pet health information.

Revenue Growth YOY Improved via Local SEO Strategy

A localized florist based in southern Australia wanted to substantially increase sales from organic traffic in order to become less reliant on pay-per-click (PPC), while building its brand and establishing itself as an authority in their local market.

Regained Position 1 for Branded Search

A high-profile homepage mysteriously went from position 1 to rendering as a video thumbnail in organic listings. We helped discover why, and fixed the rankings.

Technical SEO Grew Total Indexed Pages (From 60 to 6,086)

A prominent pet site with thousands of pages of content was only indexed for 60 of those pages.

Boost in Traffic after Manual Penalty Lifted

A professional services firm was suffering from a manual penalty, leading to a huge drop of natural search-driven leads.

Ready to partner with us?

Greenlane Marketing is a highly experienced PPC and SEO agency trusted by leading Lead Generation, E-commerce, and Media brands. We align SEO, paid media, and analytics to turn search demand into revenue growth. From day one, you’re paired with a dedicated strategist focused on your goals. Choose one-time projects or monthly retainers — whatever fits your needs. Whether it’s E-commerce, B2B, or B2C, you’ll have direct access to our strategy experts every step of the way.

Greenlane Marketing is a highly experienced PPC and SEO agency trusted by leading Lead Generation, E-commerce, and Media brands. We align SEO, paid media, and analytics to turn search demand into revenue growth. From day one, you’re paired with a dedicated strategist focused on your goals. Choose one-time projects or monthly retainers — whatever fits your needs. Whether it’s E-commerce, B2B, or B2C, you’ll have direct access to our strategy experts every step of the way.