Ashish Panchal
Jan 13, 2017 · 2 min read

<link rel="alternate" href="http://ashishuideveloper.in" hreflang="en" />OR<link rel="alternate" href="http://ashishuideveloper.in" hreflang="en-in" />


// With Price tags in $ and English language<link rel="alternate" href="http://some-ecom.com" hreflang="en" />// With Price tags in Euro and with French language<link rel="alternate" href="http://some-ecom.com/fr" hreflang="fr-FR" />// With Price tags in Euro and with German language<link rel="alternate" href="http://some-ecom.com/de" hreflang="de-DE" />

Where to put Hreflang?

The Hreflang can be placed on sitemap, on HTTP header or on-page markup. The Hfrelang attribute should be present on each pages with all the language/locale instances. Specifying this hreflang atrribute on the page does not mean that the site is only visible to those locations, it will be available to rest of the world as well but on other places it will be shown with default language in our case it is English (en).


<link rel="alternate" href="http://ashishuideveloper.in" hreflang="en-default" />

Supported Language Codes

The Hreflang attribute identifies the ISO language codes. Google uses the ISO 639–1 Codes.

  • en-GB — Specifies English content for GB users.
  • de-DE — Specifies German content for German users.
  • de-ES — Specifies German content for Spanish users.

Ashish Panchal

Written by

Front-end developer and Blogger. Love to learn and share my knowledge; Follow me on my tech blog — http://ashishuideveloper.in

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade