International SEO with Hreflang Tags
Hreflang syntax, common mistakes, x-default, implementation methods, multi-regional vs multi-language strategies, and Next.js i18n integration.
What Is International SEO?
International SEO is the practice of optimizing your website so that search engines can identify which countries and languages your content targets. Without proper signals, Google may show your English content to Hindi-speaking users in India, or your Indian pricing page to users in the United States.
The hreflang tag is the primary mechanism for telling search engines which language and regional version of a page to show to which users.
Hreflang Syntax
The hreflang attribute uses a specific format: a two-letter language code (ISO 639-1) optionally followed by a two-letter country code (ISO 3166-1 Alpha 2):
The language code is required. The country code is optional and used when you have different content for the same language in different regions (e.g., different English content for US and UK audiences).
Multi-Regional vs Multi-Language
Multi-Language Sites
Your content is translated into multiple languages but targets the same market:
Use language-only hreflang codes: en and hi.
Multi-Regional Sites
Your content targets different countries with potentially different languages, currencies, and offerings:
Use language-country hreflang codes: en-US, en-IN, hi-IN.
The x-default Tag
The x-default hreflang value designates the default page for users whose language or region does not match any of your specified versions:
Implementation Methods
HTML Link Tags
Place hreflang link tags in the of each page. Every language version must reference all other versions AND itself:
XML Sitemap
For sites with many language versions, managing HTML tags becomes unwieldy. Instead, declare hreflang in your XML sitemap using the xhtml:link element within each URL entry. This is the recommended approach for large sites with 50+ pages per language.
HTTP Headers
For non-HTML resources (PDFs, images), use HTTP headers to declare hreflang. Add a Link header with rel="alternate" and the hreflang attribute. This method is rarely needed but essential for documents that do not have an HTML head.
Common Mistakes
Missing Return Links
The most common error. If your English page declares a Hindi alternate but the Hindi page does not declare the English alternate, Google ignores both hreflang annotations. Every page must link to every other version, including itself.
Using Country Codes as Languages
hreflang="in" is wrong. "in" is a country code (India), not a language code. The correct codes are hi for Hindi, en-IN for English targeting India. This mistake is extremely common in Indian market implementations.
Inconsistent URLs
If your hreflang tag points to https://www.example.com/hi/pricing but the actual URL is https://example.com/hi/pricing (without www), Google treats them as different URLs and the annotation fails. Ensure hreflang URLs match canonical URLs exactly.
Mixing Canonical and Hreflang
Each language version should have a self-referencing canonical tag pointing to itself, not to the "main" language version. A common mistake is setting all language versions to canonicalize to the English version, which tells Google to ignore all other versions.
URL Structure Strategies
Three common approaches for international URLs:
For most businesses, subdirectories are the recommended approach. They inherit the main domain's authority and are simplest to manage with a single CMS installation.
Implementation in Next.js
Next.js has built-in internationalization support:
Measuring International SEO Performance
Track these metrics per language/region:
International SEO is complex but essential for businesses targeting multiple markets. Getting hreflang right is the foundation. Need help implementing international SEO? Contact us.
The Beyond Horizon Team
We are a digital agency based in Ajmer, India, specializing in Next.js web applications, React Native mobile apps, and UI/UX design. 150+ projects delivered.
About Us →Have a project in mind?
We build fast, SEO-ready web and mobile applications.
Get a Free Consultation→