# Implementing hreflang tags

**URL:** <https://community.hubspot.com/t/implementing-hreflang-tags/45189>\
**Category:** CMS Development\
**Tags:** html\
**Created:** [October 12, 2021, 7:48am UTC](https://community.hubspot.com/t/implementing-hreflang-tags/45189 "2021-10-12T07:48:50Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![DMallet](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/dmallet/32/29892_2.png) [@DMallet](https://community.hubspot.com/u/DMallet)\
**Post date:** [October 12, 2021, 7:48am UTC](https://community.hubspot.com/t/implementing-hreflang-tags/45189/1 "2021-10-12T07:48:50Z")

</div>

Hello everyone,

Do you know if it is possible to implement hreflang tags to the code so the user can see the appropriate version of the website according to his place and language? I’ve reached the Support team but they’re not sure whether or not we’re able to modify the code ourself. They told me some of you may be able to help me so I’m posting here.

I would really appreciate your help!

Thank you by advance,

Diane

---

<div class="post-metadata">

**Author:** ![piersg](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/piersg/32/99782_2.png) [@piersg](https://community.hubspot.com/u/piersg)\
**Post date:** [October 12, 2021, 12:05pm UTC](https://community.hubspot.com/t/implementing-hreflang-tags/45189/2 "2021-10-12T12:05:53Z")

</div>

Hi @DMallet, hreflang tags are automatically added to a multi-language page variant when it’s created as per [this documentation arcticle](https://developers.hubspot.com/docs/cms/features/multi-language-content#what-hubspot-does-automatically).

However, that does not mean the user will automatically be redirected to a mutli-language variation if it matches their place/language. You would have to manage this yourself.

To do it with location you would need a geo ip service, and that’s often wrong/inaccruate as people are using VPNs etc, and what if someone is travelling in a country but doesn’t speak the language of that country (if it even has one main one, many countries have multiple).

It would be better to use the user’s computer’s language via [Navigator language.](https://developer.mozilla.org/en-US/docs/Web/API/Navigator/language)

However, that said, I think it would better still to not automatically do this. Generally speaking with regards to UX it’s always better to let the user choose rather than make a choice for them, which is why a language switcher is useful.

---

<div class="post-metadata">

**Author:** ![Jake\_Lett](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jake_lett/32/45178_2.png) [@Jake\_Lett](https://community.hubspot.com/u/Jake_Lett)\
**Post date:** [October 12, 2021, 1:35pm UTC](https://community.hubspot.com/t/implementing-hreflang-tags/45189/3 "2021-10-12T13:35:39Z")

</div>

If you are using HubSpot multiple languages functionality you should be good to go. It creates the language hreflang tags. Google search then uses these to return the most appropriate page. [See this guide.](https://developers.google.com/search/docs/advanced/crawling/localized-versions#:~:text=Google%20Search%20returns%20the%20appropriate%20result%20for%20the%20user%2C%20according%20to%20their%20browser%20settings.)

If you want to set this manually you would need to use IP detection and then route to that page… but this is not reliable and prone to break. So if possible I would rely on the default functionality because it is less risky.

 ![Screen Shot 2021-10-12 at 9.40.26 AM.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/9/3/93e6f0539c97f3481588779247f9c2ba80bee2fc.png)
