What is hreflang?
Hreflang is a tag that links a page's language or country versions together and tells search engines which version to show to which user.
Open this screen in the panelHreflang tags look like <link rel="alternate" hreflang="…" href="…">. When the same content has separate versions in Turkish, English or for Germany, each version lists all the others. The value is a language code (tr, en) or a language-region code (en-GB, de-AT). x-default names the default page to show when no version matches. Hreflang can also be sent in an HTTP header or in the sitemap instead of the HTML.
Why it matters
Without hreflang, Google may show the English page to a user in Turkey, or the US version to someone in the UK. Correct hreflang sends users to the page in their own language and keeps the versions from being treated as duplicates of each other.
Where you see it in SEOAsist
Technical Audit doesn't check hreflang as a separate issue; it only warns with Missing html lang attribute when a page has no <html lang> declaration. You can add hreflang tags to your site through the fix channels:
- On Sites → site → Pixel tab, use Add rule and pick the Hreflang kind; write one
language | URLpair per line. - The WordPress plugin and Site API apply the same rules server-side in the HTML: Connect Site API.
Pixel rules are applied in the browser, and search engines run JavaScript late and only partially. For a permanent fix, prefer a channel that applies rules on the server.
Example
<link rel="alternate" hreflang="tr" href="https://site.com/tr/kombi-bakimi">
<link rel="alternate" hreflang="en" href="https://site.com/en/boiler-service">
<link rel="alternate" hreflang="x-default" href="https://site.com/en/boiler-service">
All three lines must appear on both versions.
Common mistakes
- Forgetting return links; if version A points to B, B must point back to A.
- Using the wrong code (for example
en-UK; the right one for the UK isen-GB). - Hreflang URLs that redirect, return 404 or canonicalize to another page.
- Leaving the page itself out of its own hreflang list.
Related articles
- Connect a custom-built site with the SEOAsist Site APIFor sites that don't run on WordPress or Shopify: install and connect the Site API so SEO fixes, blog posts and llms.txt are applied to your site automatically, server-side.
- Connect a WordPress site with the SEOAsist Connector pluginInstall the SEOAsist Connector plugin and paste the connection token to apply rules server-side, publish posts and see AI-bot visits.
- What is a canonical tag?A canonical tag is an HTML tag that tells search engines which of several URLs with the same or very similar content is the main version.