AVeryNiceWeb

How to add hreflang attribute

How to add hreflang attribute

Postby admin » Thu Dec 29, 2016 12:22 am

If you see the following text in your Adsense account:

To view this code please make a small donation or login to see it!

Then the following information will be useful to you:

Hreflang Attribute

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.
Code Sample
Code: Select all
<link rel="alternate" href="http://example.com" hreflang="en-us" />


What is Rel="Alternate" Hreflang="x"?

Introduced by Google in December 2011, the hreflang attribute allows you to show search engines what the relationship is between web pages in alternate languages. It's useful when you've created content that's specific to a local audience. The hreflang attribute adds a signal to search engines that a user querying in language "x" will want this result instead of a page with similar content in language "y".

For example, if you create a Spanish-language version of your English-language homepage, you would tag it as "Español" by using hreflang="es" so that searchers with an IP address that a search engine has reason to believe is in a Spanish-speaking country are served that page in Spanish instead of the English version. This can decrease your bounce rate and increase your conversions by making sure your target audience lands on the version of your page most appropriate for them.

Hreflang can also be used to show that you have content targeted toward variants of a single language. If that's the case, you can target your pages even more specifically by extending the hreflang attribute with annotations that indicate which region the content is localized for, e.g. Spain (hreflang="es-es") versus Mexico (hreflang="es-mx"). This is particularly useful to geotarget users to control for variations in currency, shipping, seasonality, and culture.

Hreflang is a signal, not a directive. That means that other SEO factors may override the hreflang attribute and cause a different version of your page to rank higher. To give search engines the clearest possible signals about which pages are for users in which language, make sure you're using other international SEO best practices.

Note that while Google and Yandex currently use the hreflang attribute, Bing uses language meta tags instead.
SEO Best Practices

To get the most benefit out of the hreflang attribute, the following tips are important:
Where the Hreflang Attribute Goes

The hreflang attribute can be placed in the on-page markup, the HTTP header, or the sitemap. Only use one of those locations. If you choose the sitemap, This message was hidden, please register or login to see message! can help you.

Reference:
https://moz.com/learn/seo/hreflang-tag

For WordPress users, one can simply paste the code directly into the header.php of your theme.
FIND this line:
Code: Select all
<link rel="profile" href="http://gmpg.org/xfn/11">

And paste is right above it.
The AVNW Support Team
http://www.AVeryNiceWeb.com

If you wish to add visual documentation (screenshots), make a donation and we'll let you know when the post has been updated


And, if our post has provided you with great information, there are a few ways you can show your appreciation:
  1. Like us on Facebook.- Our account had recently a hacking problem on FB and we were forced to create a new one. We lost all our posts & likes. :(
  2. Send us a testimonial.- Testimonials thanking for our good team work can be valuable to us and may encourage others to seek our support.
  3. Post a review.- Posting a good review about this site could also compel others to seek our advice & support.

Thank You!
User avatar
admin
Site Admin
 
Posts: 432
Joined: Mon Jan 13, 2014 3:18 am
Location: New York City

Return to Support

Who is online

Users browsing this forum: No registered users and 0 guests

cron