Contents
What are hreflang attributes?
Hreflang is an HTML or tag attribute that tells search engines the relationship between pages in different languages on your website. Google uses the attribute to serve the correct regional or language URLs in its search results based on the searcher’s country and language preferences.
What should I fill in hreflang?
Constructing a hreflang tag is as simple as looking up the code for your chosen language and filling in the tag. Hreflang supports any two-letter ISO 639–1 language code. (See a full list of them here.) All we did was fill in the language code (de for Germany) and URL.
The hreflang attribute tells Google which language and country you are targeting for a specific page. This allows the search engine to serve the page result to users searching in that specific language and country.
What does hreflang mean in HTML tag attribute?
Hreflang is an HTML or tag attribute that tells search engines the relationship between pages in different languages on your website.
How to make a hreflang for an alternate page?
hreflang=“x”: It’s alternate because it’s in a different language, and that language is x. href=“https://example.com/alternate-page”: The alternate page can be found at this URL. Constructing a hreflang tag is as simple as looking up the code for your chosen language and filling in the tag.
Hreflang tags are a signal, not a directive. It’s still best practice to localize the content of pages that use the same language within an hreflang cluster. You can do this by localizing pricing (e.g., USD vs. GBP ), language variants (e.g., trashcan vs. bin for US vs. the UK ), and so forth.
What do search engines look for in hreflang?
If you’ve spent time translating your content into multiple languages, then you’ll want search engines to show the most appropriate version to their users. Both Google and Yandex look at hreflang tags to help do this. Sidenote. Bing and Baidu don’t look at hreflang tags.