1. Semrush
  2. Blog
  3. SEO
  4. Frequently Asked Questions

What is hreflang and how does it work?

Author:Semrush Team

1 min read

September 16, 2025

Hreflang is an HTML attribute that tells search engines which language and regional version of a webpage to display to users based on their location and language preferences.

Hreflang works by including a code within a page’s HTML that indicates the specific language and region targeting for that page. Search engines then use this information to serve the correct version to users, improving user experience.

Here’s how you might see hreflang implemented on a webpage:

<link rel="alternate" hreflang="en-US" href="https://example.com/us/"><link rel="alternate" hreflang="en-GB" href="https://example.com/uk/"><link rel="alternate" hreflang="fr-ca" href="https://example.com/fr-ca/"><link rel="alternate" hreflang="x-default" href="https://example.com/">

The above tags tell search engines that you have US, UK, and Spanish versions of your page, plus a default version for users who don’t match any of the listed languages or regions.

Here are the key things you should know about hreflang:

Proper hreflang implementation ensures search engines serve the right content to the right users, improving both SEO performance and user satisfaction for international websites.

Confirm your hreflang tags are present with a free SEO check. To validate your implementation and catch errors, use Semrush Site Audit tool.

Share

Author Photo

Semrush Team

The Semrush Team brings together AI visibility experts, SEO specialists, data analysts, and product practitioners to help businesses grow and manage their online visibility. We publish research, experiments, and practical guidance grounded in real data from the Semrush platform, covering search, content marketing, and the broader digital marketing landscape.

Add Semrush as a preferred source in Google Search

Tells Google to show you more from Semrush in AI, Search, and Discover.

Try Semrush
Everything you need to win AI visibility and drive SEO success
Start Free Trial
Unlimited access for 7 days
Boost your digital marketing efforts
Get free trial