

When we talk about international SEO, the hreflang attribute is key to telling Google which version of your website to show based on the user’s language or region. It is a basic and key element if we want to work on international SEO aspects for any project, especially when we don’t have a territorial domain that predefines this goal.
hreflang is an HTML tag that informs search engines about the language and region a page is intended for. This is useful to avoid showing a page in the wrong language to users in other countries. For example, you may have Spanish versions for Spain and English for the U.S., and with hreflang, you ensure users see the correct version.
For more details, check out the official Google documentation on hreflang.
The hreflang can be added directly in the page's HTML and/or in the sitemap. A basic example would be:

The elements we see in the code are:
If you’re using WordPress with WPML, it automatically handles the hreflang tags. Once the languages are set up in WPML, it generates the necessary tags without manual intervention. You can leave the language as it is or add a tag to geolocate it.
PrestaShop includes hreflang automatically when you configure different languages for your store, very similarly to WordPress. Check that the tags are added correctly and use additional modules if necessary.
Shopify does not automatically add hreflang. You need to use apps like Langify or WeGlot to manage the implementation, or manually add the tags in the theme code.
It doesn’t make sense to implement hreflang if your site is in only one language. It’s only needed when you have multiple versions of the same page in different languages or regions.
You could use Google Search Console to review the implementation of hreflang, specifically the "International Targeting Report" and the URL Inspection tool. This is no longer available, so you’ll need to use external validators.
Yes, hreflang works on both subfolder-based and multi-domain websites. Just make sure to link the versions correctly between them.
Yes, you can use the same URL and hreflang tags to target multiple countries that share the same language, like Spanish for several Latin American countries.
You shouldn’t include hreflang for versions that don’t exist. Use the x-default tag to redirect to the default page when translations are missing.

Hello! drop us a line
Descobreix com implementar hreflang per millorar el SEO internacional del teu lloc web i assegurar que els usuaris trobin la versió correcta segons el seu idioma i país.