What are hreflang tags?
A beginner's introduction to the HTML attributes that tell search engines which language and regional version of a page to show.
What are hreflang tags?
Hreflang tags are essential HTML attributes that help search engines determine the appropriate language and regional version of a webpage to display for users. These tags are crucial for multilingual and international websites, ensuring that visitors see the correct content tailored to their language and location. For example, a company with separate English-language pages for the United States and Canada would use:
<link rel="alternate" hreflang="en-us" href="https://example.com/us/" />
<link rel="alternate" hreflang="en-ca" href="https://example.com/ca/" />Without hreflang tags, search engines might show the wrong version of a page, leading to a poor user experience and potential loss of engagement or sales.
Methods of implementing hreflang tags
There are multiple ways to implement hreflang tags on a website. The most common method is by placing them in the <head> section of each page. This approach works well for HTML content but can increase server load times, especially for websites with extensive multilingual content.
For non-HTML content like PDFs, hreflang tags can be placed in HTTP headers instead. Another efficient method is using XML sitemaps to store all hreflang attributes in one location, reducing potential errors and improving site performance. Whichever method is chosen, consistency and accuracy in applying hreflang tags are vital for ensuring search engines correctly interpret the intended audience for each page.
HTML <head>
Most common for HTML pages
HTTP headers
Ideal for PDFs & non-HTML
XML sitemaps
Centralized & scalable
Preventing duplicate content issues
Hreflang tags also help prevent duplicate content issues, which can arise when similar or identical pages exist in different languages or regional versions. Search engines might mistakenly classify these pages as duplicate content and choose only one to rank, potentially lowering visibility for other language versions.
By implementing hreflang correctly, website owners signal to search engines that these pages are distinct and should be ranked based on the user's language and location. However, hreflang tags are not absolute directives; Google still considers other SEO factors, such as page load speed, mobile optimization, and domain authority, when determining which page to display.
Common mistakes and best practices
Proper implementation of hreflang tags requires careful planning, including using correct language (ISO 639-1) and country (ISO 3166-1) codes.
Common mistakes
- Missing return links between language versions
- Using incorrect ISO language or country codes
- Adding hreflang tags only to the homepage
- Applying hreflang attributes to noindexed pages
- Omitting a fallback with hreflang="x-default"
Regularly checking hreflang implementation using tools like Google Search Console, specialized hreflang checkers or our own tool can help identify and fix errors.
Go deeper
Importance for international SEO
For international brands, hreflang tags play a crucial role in ensuring that localized content reaches the right audience, improving user engagement and conversion rates. By guiding search engines to serve the most relevant content to users based on their location and language preferences, businesses can enhance their global SEO strategy.
Implementing hreflang correctly helps build trust with international customers by providing content in their preferred language and currency, reducing bounce rates, and increasing the likelihood of conversions. With the growing importance of global markets, hreflang tags are an indispensable tool for businesses seeking to optimize their online presence worldwide.
Looking for a way to implement hreflang tags?
Ready to audit your tags?
Paste any URL into the checker and catch issues before Google does.