Post by account_disabled on Mar 9, 2024 5:31:56 GMT
Hreflang is a tag that allows websites to clearly and easily communicate which nationality and language a particular page is aimed at. When an English-speaking user from the United States of America searches for your website on Google, they will be directed to the right page. Google is also able to find the right combination independently . Therefore the use and implementation of this tag on web pages is not essential. Indeed, when a website is aimed only at a specific audience - for example the Italian one - it is not necessary to add this element. However, it is fair to say that in international projects and especially in large multilingual e-commerce sites, the use of hreflang is essential. What more do you need to know about this webmaster tool ? What is hreflang, a definition Subjects What is hreflang, a definition An example of hreflang tag in code Why do we need to use this tag How and where to insert hreflang Other solutions for multilingual sites This is an HTML attribute that allows you to indicate the language of a page and its geographic target.
For example, if you want to make Google understand that a page is in Venezuela Phone Number English and must be shown to a US audience you must use hreflang. The same applies if the page is in French but aimed at people searching from Geneva, Switzerland. In summary, this small string of HTML code suggests to search engines which page to show based on language and geographic region. An example of hreflang tag in code How does the tag appear on a web page? As you can see, the syntax is simple and recognizable , composed of a rel attribute - relationship between source and destination element, in this case alternation - and the hreflang specification. <link rel="alternate" hreflang="en-au" As you can see we have both the attribute to indicate the language and the region. The first is mandatory if you put hreflang, the second is optional. It's a mistake to put only the latter. In both cases we refer to specific formats for implementation: ISO 639-1 for languages and ISO 3166-1 alpha-2 . Here you will find all the codes to use to implement hreflang correctly.
Remember that after entering only the geographic area, getting the code wrong is one of the most common errors. This solution is useful for pages that do not have a preference on multilingual sites. If you have a home page from which you can choose multiple idiom solutions – therefore a language gate to reach in a similar way – you can insert the hreflang=”x-default” . So you indicate that that is a default or fallback page to land all the people looking for that resource. Worth reading: what robots.txt is and what it is for Why do we need to use this tag In this way we respect one of the key principles of SEO and UX optimization : giving the user the best possible result. What should a potential customer think if they look for a page in Spanish but find it in English? Or in Italian? Your job is to translate the site but also make sure the translation is easy to find. And available at the right time.
For example, if you want to make Google understand that a page is in Venezuela Phone Number English and must be shown to a US audience you must use hreflang. The same applies if the page is in French but aimed at people searching from Geneva, Switzerland. In summary, this small string of HTML code suggests to search engines which page to show based on language and geographic region. An example of hreflang tag in code How does the tag appear on a web page? As you can see, the syntax is simple and recognizable , composed of a rel attribute - relationship between source and destination element, in this case alternation - and the hreflang specification. <link rel="alternate" hreflang="en-au" As you can see we have both the attribute to indicate the language and the region. The first is mandatory if you put hreflang, the second is optional. It's a mistake to put only the latter. In both cases we refer to specific formats for implementation: ISO 639-1 for languages and ISO 3166-1 alpha-2 . Here you will find all the codes to use to implement hreflang correctly.
Remember that after entering only the geographic area, getting the code wrong is one of the most common errors. This solution is useful for pages that do not have a preference on multilingual sites. If you have a home page from which you can choose multiple idiom solutions – therefore a language gate to reach in a similar way – you can insert the hreflang=”x-default” . So you indicate that that is a default or fallback page to land all the people looking for that resource. Worth reading: what robots.txt is and what it is for Why do we need to use this tag In this way we respect one of the key principles of SEO and UX optimization : giving the user the best possible result. What should a potential customer think if they look for a page in Spanish but find it in English? Or in Italian? Your job is to translate the site but also make sure the translation is easy to find. And available at the right time.