Href Lang Targeting values explained

This is an article from the Alternate Hreflang Tags extension for Magento 2. We've tried our best in the preparation of this help article. If you do not find the answer you were looking for, you can always send us a message through this form.

Configure the Targeting Settings

To ensure that your content is catered towards the correct audience, there are two methods to do so, depending on how your webshop is set up. Users can be targeted based on language or region. 

1. Target based on language
Targeting store views using just the language tag is a great method if you cater to a worldwide customer base with different store views in a variety of languages. For example, our webshop's main domain www.magmodules.eu uses English while our Dutch language webshop at www.magmodules.nl uses Dutch.

We set this up as:
[storeview] Magmodules.eu - hreflang: en
[storeview] Magmodules.nl - hreflang: nl

For example, the setup for having magmodules.de for Germany and magmodules.fr for France would be:

[storeview] Magmodules.eu - hreflang: en
[storeview] Magmodules.nl - hreflang: nl
[storeview] Magmodules.de - hreflang: de
[storeview] Magmodules.fr - hreflang: fr

2. Target based on language and region
We have shown above that it is possible to target each storeview based on language. Now, we shall move on to targeting based on region. Using our Dutch storeview at magmodules.nl as an example, it is catered towards Dutch speakers. If only a Dutch payment service provider (e.g. iDeal) is available which only residents of The Netherlands are able to use, it would be best to target only people from this country.

Our setup would then be:
[storeview] Magmodules.eu - hreflang: en
[storeview] Magmodules.nl - hreflang: nl-nl

If the tag is "nl-nl", the first part of the tag, "nl", represents the language while the second part of the tag "nl" represents the region. This is useful when you only provide local shipping methods in each storeview

The values used in the hreflang attribute follow the ISO 639-1 (http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format for language and the ISO 3166-1 Alpha 2 (http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format for region, for example:

en-GB: English content, for GB users
fr: French content, independent of region
de-ES: German content, for users in Spain

For example, you can lead all (other) English speakers to a generic English (en) page while English speakers from Ireland (en-ie) paying in Pounds, Canada (en-ca) paying in Canadian Dollars, Australia (en-au) paying in Australian Dollars and England (en-gb) paying in Pounds will be led to a different specific store view.

[storeview] example.com/en-ie - hreflang: en-ie
[storeview] example.com/en-ca - hreflang: en-ca
[storeview] example.com/en-au - hreflang: en-au
[storeview] example.com/en-gb - hreflang: en-gb
[storeview] example.com/ - hreflang: en  

Direct Help

At Magmodules, our support team is here to help you every step of the way. If you can't find a solution in our Knowledgebase, simply fill in the form below. We are in the Central European Timezone, and all your details are securely sent to us.
The more information you provide, the better we can assist you. Trust us to guide you through any challenge and ensure a seamless experience with our products and services.
Support by e-mail contact@magmodules.eu
star star star star star
star star star star star
Matt Austin
Possibly the fastest support response times of any Magento Extension vendor. Great extensions too!
Google Last week
star star star star star
star star star star star
Jan Privé
Dankzij de heldere uitleg en snelle reactie van Magmodules kon mijn vraag, en dus mijn Magento-probleem, binnen enkele uren worden beantwoord. Doeltreffend, zonder moeilijke termen, gewoon zo als het zou moeten zijn.... Bedankt!
Google 10 days ago
star star star star star
star star star star star
Denis Metzler
To evaluate a provider, it is not enough to consider only the product offered, but also its after-sales service, such as support and troubleshooting. Magmodules has been extremely satisfactory at all levels on multiple occasions and sets the bar at the top when comparing the competition.
Google 13 days ago
star star star star star
star star star star star
Bleijenberg winkelinrichting en materialen
Goed bereikbaar, reageren snel en denken oplossingsgericht. Een aanrader.
Google 30 Jul 2025
star star star star star
star star star star star
Patrick Verduijn
Magmodules biedt plugins aan die van hoge kwaliteit zijn tegen een goede prijs, waar dit bedrijf in uitblinkt is de bereidheid om de zeldzame feedback & problemen met de plugins te willen onderzoeken, mee te willen denken in het debuggen van problemen en goede oplossingen toe te passen. In mijn decennium ervaring met Magento & 3th parties is Magmodules absoluut een uniqum binnen de markt.
Google 25 Jul 2025
star star star star star
star star star star star
Erik de Groot
Magemodules heeft hele sterke Magento extensies en een proactieve support. Al jaren heel erg tevreden over jullie service en producten!
Google 18 Jul 2025
star star star star star
star star star star star
René Zeuner
We are using the Mollie Magento extension from Magmodules. It works excellently without flaws. Very fast, competent and friendly support. Thanks!
Google 30 Jun 2025
star star star star star
star star star star star
R. U.
Erg goed team, reageren snel en duidelijk en hebben met toegang tot onze database erg goed geholpen (eigenlijk een gratis customization).
Google 18 Jun 2025
star star star star star
star star star star star
Hugo de Groot
Uitstekende support! Wij gebruiken o.a. de Rich Snippets Suite extensie voor onze Magento 2 webshop (Hyvä) en hadden een specifieke vraag over structured data op PLP-pagina’s. Binnen no-time kregen we een inhoudelijk en duidelijk antwoord. Zeer prettig contact en goed onderbouwde uitleg. Absoluut een betrouwbare partner voor Magento-extensies!
Google 13 Jun 2025
star star star star star
star star star star star
Rick Manders
Dit is nog eens een modulemaker! Stopt niet tot het werkt, blijft enthousiast. Grote dank!
Google 04 Jun 2025