How to Set Up Hreflang Tags for Free: Complete Step-by-Step Guide
You can add hreflang tags for free by editing your HTML head, using free online generators, leveraging CMS plugins, or adding them to your XML sitemap. Webflow users can automate the entire process with...
Setting up hreflang tags without spending money is straightforward. You have four main free options: add the tags directly to each page's HTML head, use a free online hreflang tag generator, install a free plugin for your CMS, or include hreflang annotations in your XML sitemap. Each method works, but the right choice depends on your platform, site size, and how often you publish new content.
What Hreflang Tags Are and Why They Matter
Hreflang tags tell search engines which language and regional version of a page to show users. Without them, Google may serve the wrong language version to visitors, causing duplicate content issues and poor user experience. The tag uses ISO language codes (like "en" for English) and optional region codes (like "en-US" for US English).
If you run a multilingual site, hreflang is not optional. It prevents the "wrong language" problem where a Spanish user sees your English page, or a UK user sees your US page with dollar prices. Search engines treat each language version as a separate page when hreflang is correct, avoiding duplicate content penalties.
Free Method 1: Manual HTML Implementation
Add hreflang link elements to the <head> of every page. Each page must reference itself and all alternate versions. For a page with English, Spanish, and French versions:
- Open your page template or individual HTML file.
- Inside
<head>, add a<link rel="alternate" hreflang="x" href="URL" />for each version. - Include a self-referencing tag for the current page.
- Add
hreflang="x-default"for the fallback page (usually your main language).
Example for the English homepage:
<link rel="alternate" hreflang="en" href="https://example.com/" />
<link rel="alternate" hreflang="es" href="https://example.com/es/" />
<link rel="alternate" hreflang="fr" href="https://example.com/fr/" />
<link rel="alternate" hreflang="x-default" href="https://example.com/" />
Repeat this block on every translated page, changing the self-referencing URL. This method gives you full control but becomes unmanageable beyond 10-20 pages.
Free Method 2: Online Hreflang Tag Generators
Tools like Geotargetly's free hreflang generator let you input your URLs and language codes, then output the complete tag block. Paste the result into your page head. This reduces syntax errors but still requires manual placement on each page.
- List every language version URL in a spreadsheet.
- Use the generator to create tags for each page.
- Copy the output into each page's
<head>. - Verify each page references all versions including itself.
Best for static sites under 50 pages. For larger sites, the copy-paste workload grows fast.
Free Method 3: CMS Plugins and Built-in Features
Most popular CMS platforms have free plugins or native settings for hreflang:
- WordPress: Polylang (free version), WPML's free tier, or MultilingualPress add hreflang automatically when you create translations.
- Shopify: Use the free "Hreflang Manager" app or edit theme.liquid to output tags based on localization settings.
- Wix: Multilingual feature adds hreflang automatically when you enable languages.
- Squarespace: Limited native support; requires code injection per page.
Plugins handle the self-referencing and bidirectional linking automatically. When you publish a new translation, the plugin updates tags on both pages. This scales better than manual methods.
Free Method 4: XML Sitemap Hreflang Annotations
Add hreflang to your XML sitemap instead of page HTML. This keeps your HTML clean and centralizes management. Each <url> entry gets <xhtml:link> children for alternates.
- Generate or edit your sitemap.xml.
- For each URL, add
<xhtml:link rel="alternate" hreflang="lang" href="url" />for every version. - Include the namespace:
xmlns:xhtml="http://www.w3.org/1999/xhtml". - Submit the updated sitemap in Google Search Console.
Example sitemap entry:
<url xmlns:xhtml="http://www.w3.org/1999/xhtml">
<loc>https://example.com/</loc>
<xhtml:link rel="alternate" hreflang="en" href="https://example.com/" />
<xhtml:link rel="alternate" hreflang="es" href="https://example.com/es/" />
<xhtml:link rel="alternate" hreflang="fr" href="https://example.com/fr/" />
<xhtml:link rel="alternate" hreflang="x-default" href="https://example.com/" />
</url>
Works well for large sites. Many SEO plugins (Yoast, Rank Math) generate hreflang sitemaps automatically when you configure languages.
Verification: How to Confirm Hreflang Works
After implementation, verify before waiting for Google to crawl:
- Google Search Console: International Targeting report (legacy) or URL Inspection tool shows detected hreflang tags and errors.
- Hreflang checker tools: Free tools like Merkle's hreflang tester or TechnicalSEO.com's hreflang validator crawl a URL and report tag validity.
- Manual check: View page source, search for "hreflang", confirm all versions listed including self-reference and x-default.
- Sitemap test: Submit sitemap in Search Console, check for hreflang errors in the Sitemaps report.
Common errors: missing self-reference, missing x-default, mismatched URLs (trailing slash differences), wrong language codes, or tags only on some pages. Fix all errors before expecting correct indexing.
Common Mistakes That Break Hreflang
| Mistake | Why It Fails | Fix |
|---|---|---|
| Missing self-referencing tag | Google ignores the cluster if a page doesn't reference itself | Add hreflang tag pointing to the current page on every version |
| No x-default fallback | Users with unsupported languages get random version | Add hreflang="x-default" pointing to your primary language page |
| Language code errors | Invalid codes like "en-UK" instead of "en-GB" | Use ISO 639-1 language codes and ISO 3166-1 alpha-2 region codes |
| URL mismatches | Trailing slash, http/https, or www differences break matching | Use canonical URLs consistently across all hreflang references |
| One-way linking | Page A references B but B doesn't reference A | Every version must link to every other version bidirectionally |
| Tags only on homepage | Deep pages lack hreflang, causing wrong-language rankings | Implement on every indexable page that has translations |
How SeaText Automates Hreflang for Webflow
If you use Webflow, SeaText's free Website Translation Agent eliminates manual hreflang work entirely. The agent detects each visitor's language, translates pages instantly, and keeps new posts, products, and updates translated in the background. When you publish a new Webflow page, product, post, or headline, SeaText sees it and translates it automatically.
SeaText handles the complete multilingual SEO setup: it generates hreflang tags for all 125 supported languages, creates localized page versions, and tracks performance by language and market. You activate it once on Webflow, and the translation runs by itself. No page limits, no language limits, and no manual translation work.
The agent preserves brand context and optimizes translated copy so visitors in new markets can understand the product and convert without waiting on a manual localization project. This includes automatic hreflang implementation across every translated page.
Key Facts
| Fact | Details |
|---|---|
| Free hreflang methods | Manual HTML, free generators, CMS plugins, XML sitemap |
| Required tag components | Self-reference, all alternates, x-default, valid ISO codes |
| Verification tools | Google Search Console, Merkle hreflang tester, TechnicalSEO validator |
| SeaText Webflow translation | 125 languages, automatic hreflang, no page/language limits |
| SeaText activation | One-minute install, runs automatically after activation |
| Content updates | SeaText detects new Webflow content and translates in background |
Limitations of Free Hreflang Approaches
Manual and generator methods don't scale. Every new page or translation requires tag updates across all versions. CMS plugins help but may not cover custom post types or headless setups. Sitemap method requires sitemap regeneration on every change.
Free tools also lack validation workflows. You won't know tags broke until Google reports errors. For sites publishing daily in multiple languages, automation becomes necessary. SeaText's Webflow agent solves this by handling translation and hreflang together, but it's platform-specific.
If you're not on Webflow, you'll need a developer to build automation or invest in a paid multilingual SEO platform. The free methods work for small, stable sites. They become liabilities on growing multilingual properties.
FAQ
Do I need hreflang if I only have one language?
No. Hreflang is only for sites with multiple language or regional versions of the same content.
Can I use hreflang across different domains?
Yes. Use full absolute URLs in the href attribute. Each domain must reference all versions including those on other domains.
What's the difference between hreflang and canonical tags?
Canonical tells Google which version is primary for indexing. Hreflang tells Google which version to serve based on user language. Use both: each language version self-canonicalizes and hreflangs to alternates.
How long until Google recognizes new hreflang tags?
Depends on crawl frequency. Submit updated URLs or sitemap in Search Console to accelerate. Typically days to weeks.
Should I use hreflang on non-canonical pages?
Only implement hreflang on indexable, canonical pages. Noindex, redirected, or canonicalized-to-another pages should not have hreflang tags.
Can I automate hreflang without a plugin?
Yes, with custom code that reads your language mapping and injects tags at render time. Requires developer resources. SeaText does this automatically for Webflow.
What happens if I have hreflang errors?
Google may ignore your hreflang cluster, serve wrong language versions, or treat pages as duplicates. Fix errors in Search Console International Targeting report.
Further reading and comparison sources
These external sources provide additional context for evaluating the topic. Their inclusion is not an endorsement.
Learn more
Visit the website for more information.