Website Tips

Hreflang Tags Explained: A Simple Guide for Small Business Websites

By JustAddContent Team·2025-12-25·17 min read
Hreflang Tags Explained: A Simple Guide for Small Business Websites

You have invested time and money into translating your website into multiple languages, but there is a problem you might not even know about. Google is showing your English pages to Spanish-speaking searchers in Mexico, your French pages are appearing in Canadian English search results, and your German content is nowhere to be found in German search results. The issue is not your content quality or your domain authority. The issue is that search engines do not know which version of your page to show to which audience. This is the exact problem that hreflang tags solve. They are a small piece of code that tells search engines "this page has multiple language versions, and here is which version to show to each audience." Getting hreflang right means your translated content actually reaches the people it was created for. Getting it wrong (or not implementing it at all) means your multilingual investment is underperforming.

What Hreflang Tags Are and Why They Exist

Hreflang is an HTML attribute that tells search engines about the language and geographic targeting of a web page. It was introduced by Google in 2011 to help webmasters manage multilingual and multi-regional content. Yandex also supports hreflang, though Bing uses a different approach (the content-language meta tag).

The core problem hreflang solves. When you have the same page in multiple languages, search engines face a dilemma. They see multiple pages with very similar content (because translations often maintain the same structure and topics) and need to decide which one to show in search results. Without hreflang, search engines guess, and they frequently guess wrong. A Spanish speaker in Spain might see your English page, while an English speaker in the US might see your French page. Hreflang eliminates the guessing.

Hreflang prevents duplicate content confusion. Without hreflang, search engines might interpret your translated pages as duplicate content (the same information presented in slightly different ways) rather than as intentional language variations. This can lead to your translated pages being filtered out of search results entirely, or to search engines consolidating signals onto the wrong version.

Hreflang improves the user experience. When the correct language version appears in search results, users are more likely to click (because they see a snippet in their language), more likely to stay on the page (because the content matches their expectations), and more likely to convert (because they can fully understand what you are offering).

Hreflang is a signal, not a directive. It is important to understand that hreflang is a hint to search engines, not a command. Google uses hreflang as one of many signals when deciding which page to show. In most cases, Google follows hreflang correctly, but there are edge cases where other signals (like backlinks or content relevance) may override the hreflang annotation.

For a broader understanding of how technical SEO elements like hreflang fit into your overall search strategy, explore our guide to technical SEO for small businesses.

Understanding Hreflang Syntax

Hreflang syntax is precise, and even small errors can cause the entire implementation to fail. Understanding the format is essential before you start implementing.

The basic format. An hreflang tag looks like this in HTML:

<link rel="alternate" hreflang="es" href="https://yoursite.com/es/page" />

This tells search engines: "There is an alternate version of this page in Spanish, and it is located at this URL."

Language codes follow the ISO 639-1 standard. These are two-letter codes: "en" for English, "es" for Spanish, "fr" for French, "de" for German, "pt" for Portuguese, "ja" for Japanese, "zh" for Chinese, and so on. You must use the correct ISO 639-1 code. Using "sp" for Spanish (instead of the correct "es") is a common mistake that invalidates the tag.

Regional codes follow the ISO 3166-1 Alpha-2 standard. You can optionally add a country code to specify a regional variant: "en-US" for American English, "en-GB" for British English, "es-MX" for Mexican Spanish, "pt-BR" for Brazilian Portuguese. The language code comes first, followed by a hyphen and the country code.

You can specify language only, or language plus region. "hreflang=es" targets all Spanish speakers regardless of location. "hreflang=es-MX" targets specifically Spanish speakers in Mexico. If you do not have region-specific content (you have one Spanish version for all Spanish speakers), use the language code alone. If you have different Spanish content for Spain and Mexico, use language-plus-region codes.

The x-default value. A special hreflang value, "x-default," designates the fallback page for users whose language or region does not match any of your specific hreflang tags. This is typically your main English page or your language-selection page. Including x-default is strongly recommended.

Every page must reference itself. This is a common point of confusion. Each page in a set of language variations must include hreflang tags for all variations, including a self-referencing tag. The English page must list itself as the English version, the Spanish page as the Spanish version, and so on. Missing the self-referencing tag is one of the most frequent hreflang errors.

Three Methods of Implementing Hreflang

There are three ways to implement hreflang tags, and you only need to use one. Each method communicates the same information to search engines, just through different mechanisms.

Method 1: HTML head tags. Place hreflang link elements in the head section of each HTML page. This is the most common implementation method for small business websites because it is straightforward and does not require server access.

For a page that exists in English, Spanish, and French, the English page would include these tags in its head section:

<link rel="alternate" hreflang="en" href="https://yoursite.com/page" /> <link rel="alternate" hreflang="es" href="https://yoursite.com/es/page" /> <link rel="alternate" hreflang="fr" href="https://yoursite.com/fr/page" /> <link rel="alternate" hreflang="x-default" href="https://yoursite.com/page" />

The Spanish and French pages would contain the identical set of tags. Every page in the group references every other page in the group, including itself.

Method 2: HTTP headers. For non-HTML files (PDFs, for example) or situations where you cannot modify the HTML head, you can send hreflang information through HTTP response headers. The format is:

Link: <https://yoursite.com/es/page>; rel="alternate"; hreflang="es"

This method requires access to your server configuration or the ability to set custom HTTP headers. It is less common for small business websites but is necessary for file types that do not have an HTML head section.

Method 3: XML sitemap. You can include hreflang annotations in your XML sitemap. Each URL entry includes xhtml:link elements for each language version. This method is useful for large websites with many pages because you can manage all hreflang annotations in a single file rather than editing the HTML of every page individually.

For most small business websites with a manageable number of pages, the HTML head tag method is the simplest and most practical option. If your website has hundreds or thousands of pages, the XML sitemap method is more efficient to manage.

Step-by-Step Implementation Guide

Here is a practical walkthrough for implementing hreflang on a typical small business website.

Step 1: Inventory your multilingual pages. Create a spreadsheet listing every page on your website and its corresponding translations. Each row should include the primary URL, the translated URLs, and the language/region code for each version. This inventory is your hreflang map.

Step 2: Determine your language and region codes. Decide whether you need language-only codes (en, es, fr) or language-plus-region codes (en-US, en-GB, es-MX). If you have one English version for all English speakers and one Spanish version for all Spanish speakers, language-only codes are sufficient. If you have different content for different regions within the same language, you need region codes.

Step 3: Generate the hreflang tags for each page. Using your spreadsheet, create the complete set of hreflang tags for each page. Remember that every page must reference all other versions AND itself. For a site with three language versions, each page will have four hreflang tags (one for each language plus x-default).

Step 4: Add the tags to each page. Place the hreflang link elements within the head section of each page. If you use a CMS like WordPress, plugins like WPML or Yoast SEO can generate hreflang tags automatically. If you are working with custom code, you will need to add them manually or through a template that generates them dynamically.

Step 5: Validate your implementation. Use Google Search Console's International Targeting report and third-party tools like Aleyda Solis's hreflang tag generator/validator, Screaming Frog, or Sitebulb to check your implementation for errors. Common issues include missing self-referencing tags, incorrect language codes, and URLs that return 404 errors.

Step 6: Monitor in Google Search Console. After implementation, check Google Search Console regularly for hreflang-related errors. Navigate to the Enhancements section and look for any reported issues. Google may take several weeks to process your hreflang annotations, so do not expect immediate results.

Common Hreflang Mistakes and How to Avoid Them

Hreflang implementation has a surprisingly high error rate. Studies have found that a majority of websites using hreflang have at least one implementation error. Here are the most common mistakes and how to prevent them.

Missing return links. If Page A says "my Spanish version is Page B," then Page B must say "my English version is Page A." If the return link is missing, Google may ignore the hreflang annotation entirely. This bidirectional requirement is the single most common source of hreflang errors.

Incorrect language codes. Using "uk" for Ukrainian (the correct code is "uk" for Ukrainian, but many people use "ua" which is the country code for Ukraine), "jp" for Japanese (the correct code is "ja"), or "en-UK" instead of "en-GB" are all common errors. Always verify your language and country codes against the ISO standards.

Pointing to non-existent pages. Hreflang tags that reference URLs that return 404 errors are ignored by Google. Before implementing hreflang, verify that every URL referenced in your tags actually exists and returns a 200 status code. If you remove or redirect a page, update the hreflang tags on all related pages.

Mixing hreflang methods. If you implement hreflang in both your HTML head and your XML sitemap, and the two implementations conflict, Google may get confused. Stick to one method and implement it consistently.

Using hreflang on canonicalized pages incorrectly. If a page has a canonical tag pointing to a different URL, the hreflang tags should reference the canonical URL, not the non-canonical version. The canonical URL and the hreflang URL must agree. Conflicting canonical and hreflang signals are a common source of problems.

Forgetting x-default. While not technically required, omitting the x-default tag means there is no designated fallback for users who do not match any of your language/region targets. Always include x-default pointing to your primary or most universal page.

Not including self-referencing tags. Every page must include an hreflang tag pointing to itself. The English page needs an hreflang="en" tag pointing to its own URL. This seems redundant, but Google explicitly requires it for proper processing.

Hreflang for WordPress Websites

WordPress is the most popular CMS for small business websites, and several plugins simplify hreflang implementation.

WPML (WordPress Multilingual Plugin). WPML automatically generates hreflang tags for all your translated content. When you create a translation relationship between pages, WPML adds the appropriate hreflang annotations. This is the most comprehensive solution and handles most edge cases. WPML also manages URL structures, language switchers, and translation workflows.

Yoast SEO. If you use WPML alongside Yoast SEO, Yoast will automatically generate hreflang tags based on the translation relationships WPML has established. This integration works seamlessly and requires no manual configuration.

Polylang. Another popular WordPress multilingual plugin, Polylang generates hreflang tags for translated content. It is lighter weight than WPML and free for basic functionality, making it a good option for smaller sites.

Manual implementation. If you prefer not to use a multilingual plugin (perhaps because you manage translations differently), you can add hreflang tags manually to your theme's header.php file or use a custom plugin. However, manual implementation requires careful maintenance whenever pages are added, removed, or restructured.

Verify plugin output. Even when using plugins, verify that the generated hreflang tags are correct. Plugins can have bugs, configuration errors, or edge cases that produce incorrect output. Use the validation tools mentioned earlier to check the actual HTML output of your pages.

Hreflang for Shopify, Wix, and Other Platforms

Not every small business uses WordPress. Here is how hreflang works on other popular platforms.

Shopify. Shopify has built-in support for multilingual stores through its Markets feature. When properly configured, Shopify automatically generates hreflang tags for your translated content. Third-party apps like Langify and Weglot also handle hreflang generation. However, Shopify's implementation can be limited for complex multilingual setups, so verify the output.

Wix. Wix Multilingual automatically generates hreflang tags when you translate your site through its built-in translation tools. The implementation is handled behind the scenes, and you do not need to add any code manually. Check that the auto-generated tags are correct using a crawling tool.

Squarespace. Squarespace does not have native multilingual support or automatic hreflang generation. You can add hreflang tags through custom code injection in the site header, but managing translations on Squarespace requires a more manual approach. Third-party tools like Weglot can add multilingual functionality and hreflang tags.

Custom or headless websites. For custom-built websites, hreflang implementation is entirely manual (or programmatic, depending on your development approach). This offers the most control but also the most responsibility. Implement hreflang generation as part of your build process so that tags are automatically updated when content changes.

Testing and Validating Your Hreflang Implementation

Validation is not optional. Given the high error rate in hreflang implementations, testing your setup is essential.

Google Search Console. The primary tool for monitoring hreflang performance. Check the International Targeting report and the URL Inspection tool. Google Search Console will report errors like missing return tags, unsupported language codes, and URLs that could not be crawled.

Screaming Frog SEO Spider. This desktop crawling tool can audit your entire website's hreflang implementation. It identifies missing return links, orphan pages (pages referenced in hreflang but not crawlable), incorrect language codes, and inconsistencies between your hreflang annotations and your actual page content.

Aleyda Solis's Hreflang Tags Generator. This free online tool helps you generate correct hreflang tags and validate existing implementations. It is particularly useful for manually managed implementations where you need to ensure the syntax is correct.

Sitebulb. Another website auditing tool that provides detailed hreflang analysis, including visual maps of hreflang relationships between pages. It makes it easy to spot missing links and inconsistencies.

Manual spot-checking. Even with automated tools, manually inspect a sample of your pages to verify that the hreflang tags in the HTML source match your intended language targeting. View the page source in your browser and search for "hreflang" to see the actual tags.

Hreflang and Other International SEO Signals

Hreflang does not work in isolation. It is one of several signals that search engines use to determine language and regional targeting. Understanding how it interacts with other signals strengthens your overall international SEO.

Content language. The actual language of your page content is the strongest signal. No amount of correct hreflang tagging will make Google show a page in French search results if the content is in English. The content language and the hreflang annotation must match.

URL structure. Your choice of subdirectories (/es/), subdomains (es.yoursite.com), or ccTLDs (.es) provides additional geographic and language signals. Hreflang works with all URL structures, but the URL structure reinforces the targeting.

Google Search Console geotargeting. In Google Search Console, you can set a geographic target for your property. This is relevant for generic top-level domains (.com, .net, .org) where the domain itself does not indicate a country. If you use ccTLDs, geotargeting is implicit.

Server location. While less important than it once was (especially with CDNs), your server location can influence geographic targeting. A server in Germany hosting German-language content reinforces the signal for German search results.

Backlink profile. Links from websites in the target language and region strengthen your page's relevance for that audience. A Spanish page with many backlinks from Spanish-language websites in Spain will perform better in Spanish search results than one with only English-language backlinks.

For a comprehensive overview of how all these SEO factors work together, our guide to SEO for small businesses provides the foundation you need.

When You Do Not Need Hreflang

Not every multilingual website needs hreflang tags. Understanding when they are unnecessary prevents you from adding complexity without benefit.

Single-language websites. If your website only exists in one language, hreflang is not relevant. There are no alternate language versions to annotate.

Websites using browser-based translation widgets. If your "multilingual" approach is a Google Translate widget that translates content in the visitor's browser, there are no separate language URLs to annotate with hreflang. The translated content exists only in the browser, not on your server, so search engines never see it.

Websites targeting a single market. If your Spanish website targets only Spanish speakers in the United States and you have no plans to target Spain, Mexico, or other Spanish-speaking markets, the value of hreflang is limited. It becomes more important when you have overlapping language audiences in multiple markets.

Very small websites with minimal organic traffic. If your website has five pages and receives minimal search traffic, the overhead of implementing and maintaining hreflang may not be justified. Focus on creating quality multilingual content first, and add hreflang when your site grows to a point where it has meaningful organic visibility.

Maintaining Hreflang Over Time

Hreflang is not a set-and-forget implementation. As your website evolves, your hreflang annotations need to keep pace.

Update hreflang when adding new pages. Every time you create a new page and its translations, add hreflang annotations to all versions. Forgetting this step means the new page will not benefit from proper language targeting in search results.

Update hreflang when removing or redirecting pages. If you delete a page or set up a redirect, update the hreflang tags on all related pages. Hreflang tags pointing to 404 pages or redirect chains cause errors and are ignored by Google.

Audit hreflang quarterly. Run a full hreflang audit at least every three months using Screaming Frog, Sitebulb, or a similar tool. Websites change frequently, and small issues accumulate over time into significant problems.

Monitor Google Search Console for errors. Check the International Targeting report regularly for new hreflang errors. Google may report issues weeks or months after they are introduced, so regular monitoring catches problems before they significantly impact your traffic.

Coordinate with your translation workflow. Make hreflang management part of your standard translation process. When a new translation is published, the hreflang update should be a required step in the publishing checklist, not an afterthought.

Hreflang tags are a small technical detail with an outsized impact on your multilingual website's performance in search results. When implemented correctly, they ensure that the right content reaches the right audience, maximizing the return on your translation investment. When implemented incorrectly (or not at all), they allow search engines to make their own decisions about which language version to show, often with suboptimal results. Take the time to implement hreflang properly, validate thoroughly, and maintain consistently. The effort pays off in higher organic visibility, better user experiences, and stronger conversion rates across all your language markets.

Get weekly small business tips

Practical guides, tool reviews, and actionable advice delivered to your inbox every week. No spam, unsubscribe anytime.