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 we have provided you with great information or service, there are a few ways you can show your appreciation:
  1. Become a AVNW Paid Subscriber.- We are constantly updating our data base with great tips and solutions to common problems, especially with Ultimate Member. If you found our site because of a WordPress issue, then your issue (if solved) will be published with the solution(s) for others to benefit from.
  2. Make a small donation.- We have buttons at the top and bottom that will allow you to do so via PayPal fast.
  3. Send us a testimonial.- Testimonials giving us praise for our good work is also valuable to us and encourages others to seek our support.
  4. Post a review (OP only).- If you came from a WordPress support board, posting a good review about our free service could also compel others to seek our advice & support.
  5. Like us on Facebook.- Recently our account had a problem on FB and we were forced to create a new one. We lost all our posts & likes. :(
If you do all 5, you'll get a surprise bonus from us. :)
Thank You!
User avatar
admin
Site Admin
 
Posts: 381
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