This article is a mirror article of machine translation, please click here to jump to the original article.

View: 11528|Reply: 1

[Source] How to use Hreflang for SEO

[Copy link]
Posted on 7/17/2018 1:34:17 PM | | |

What is Hreflang & what does it do?
The hreflang tag, like the standard and pagination tags, is an HTML tag that represents the relationship between two pages. In the case of hreflang, it means that both URLs use different languages to hold the same content, or use the same language but target different geographic regions.

When done correctly, each hreflang tag tells bots to read the page in order to find the right content for users who don't speak the first page language. When someone performs a search, Google (Bing doesn't use hreflang tags) does the following:

  • It decides to rank URLs according to the algorithm
  • It checks the page's code, looking for hreflang tags
  • It looks at the user's current location (based on IP address) and language settings
  • It displays the most relevant URL in the SERPs and sends the user (if clicked) to that URL
The reason search engines check hreflang tags is that it can provide the correct version of the page based on the user's language settings. In short, this is how Google knows which URL to show for Spanish speakers, and which one for English speakers. It is also how to know which version is available in the United States and the United Kingdom.

How to add Hreflang to your page
If you have an HTML page, the hreflang tag <head>looks like this:



For non-HTML pages (like PDFs), add hreflang comments in the HTTP header:


In the example above, the hreflang="en" part of these tags tells Google that the URL listed is the English version of the page, so it shows the URL to users who have set their English language in the browser to their language, English-speaking country. If they have hreflang="es", Google will show the URL for Spanish-speaking users.

When adding hreflang tags to your pages, you must include links to each version of the page, including self-references. So, if you have pages in English, Spanish, and French, each page has three tabs:




Geolocation can be added to the hreflang tag by adding the country code after the language code in the hreflang attribute. So, if the above website targets different countries and each language, they will look like this:




When Google sees these labels, it knows to show the English version to users in the United States, Mexico and France.

The hreflang value must always be written to the language country, and geotargeting is limited to the country. Google does not support cities, regions, or continents.

Language codecan be found here:
https://zh.wikipedia.org/wiki/IS ... 3%E7%A0%81%E8%A1%A8

Country codeOver here:
https://zh.wikipedia.org/wiki/%E ... 0%E4%BB%A3%E7%A2%BC





Previous:vs2017 browser input path to terminate debugging
Next:Several schemes for distributed crawlers to use proxy IPs
Posted on 12/20/2018 10:00:17 AM |
Don't specify just the country code. Google doesn't automatically derive languages from country tags. If you want to simplify the markup, you can specify only the language code. Adding the country code after the language code makes the page only visible to specific regions. For example:

be: Belarusian content, regardless of region (except French-speaking Belgium)
nl-be: Dutch content, only for Belgium
fr-be: French content, only for Belgium

Google introduces:https://support.google.com/webmasters/answer/189077?hl=zh-Hans
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com