What do you need to know about hreflang?

What do you need to know about hreflang?

Hreflang is an HTML attribute used by Google to specify the language and geographical targeting of a webpage. This allows webmasters to help search engines serve up the correct version of a page in different languages.

How are hreflang tags used in Google search?

Hreflang tags help Google to understand the relationship between these pages. They will try to show the correct version shown in search results, but it is not guaranteed. 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.

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.

What does rel = ” alternate hreflang ” mean on Google?

The hreflang attribute (also referred to as rel=”alternate” hreflang=”x”) tells Google which language you are using on a specific page, so the search engine can serve that result to users searching in that language. What is Rel=”Alternate” Hreflang=”x”?

The first specifies the URL of the alternate Italian version of the page, and the second is a self-referencing tag that points back to the page itself. The Italian page would also need both of these hreflang tags. Sidenote.

When to use the hreflang x-default tag?

The hreflang x‑default tag specifies the default or fallback page that gets shown to users when no other language variant is appropriate. You don’t have to use them, but Google recommends that you do. This is what one looks like:

Are there any search engines that don’t use hreflang?

Sidenote. Bing and Baidu don’t look at hreflang tags. They instead use the content-language HTML attribute. Catering to the native tongue of search engine users also improves their experience.

Is it good practice to localize hreflang tags?

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.

Why is the hreflang tag essential to global SEO?

Think of the hreflang tag this way: when a user searches in language x, the hreflang tag ensures the search result is also delivered in language x, rather than language y or z. At its core, the hreflang tag is all about creating a great user experience. It is important to note, an hreflang tag acts as a signal to search engines, not as a directive.

How to use hreflang for an alternate link?

link rel=“alternate”: The link in this tag is an alternate version of this 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.

When to add hreflang tags to a website?

In plain English, that means that every page should have a self-referential hreflang tag—i.e., one that points back to itself. So, if we want to add a hreflang tags between an English page (https://example.com/hello) and an Italian page (https://example.com/ciao), each should have the following hreflang tags: