hreflang tag This term. In fact, this may be why you read this article now.
So -what is hreflang? If you use a variety of languages \u200b\u200bon the website, why do you still need to care about the hreflang label?
Okay, if you continue to read, you will be able to answer these questions and more!
In our complete guide, you will understand all the knowledge about the hreflang label, including the following:
- What is the hreflang tag?
Hreflang SEO influence
When some of their hreflang examples should be used
HREFLANG implementation, including simple methods to set hreflang tags when using WordPress
Let’s dig in depth!
What is the hreflang tag?
The HREFLANG tag is a small behind -the -scenes code to identify the language and geographical area of \u200b\u200bthe page on your website.
Search engine can use these tags to understand your website and provide the searchker with the most related content Essence
More specifically, the HREFLANG label allows you to link the content together so that the search engine can understand that these pages are interconnected, but settings for different languages \u200b\u200bor regions.
For example, suppose you have an English page in
https://yourSite.com/hello-world/
, and then on https://yoursite.com/es/holala -mundo/ translates the same content into Spanish. Using the hreflang tag, you can tell the search engine \”Hey, these two pages have the same content/purpose, but one page is for people who speak English, and the other is for Spanish people.\” Essence
You can also
beyond the
language, and you can also tell the search engine that your pages are localized for different geographical areas.
For example, \”Hey, these two pages are the same content, both in English, but one is targeted at the United States. One is for Britain. \”
The following is an example of hreflang marked in your website:
The influence and importance of hreflang seo
Reverse links and keyword research are not the main SEO ranking factor, but use them correctly is an important part of SEO of multi -language or multi -location website pages.
There are three main SEO benefits using the HREFLANG tag.
1. Prevent duplicate content
First, HREFLANG helps to prevent repeated content on the website. For example, assuming that you have two
almost
, the same content page, except for one who speaks English for the United States, and the other speaks English for Australia.
By adding related HREFLANG tags to language and regions, you can make search engines know that these pages are not duplicated content, but optimized for different audiences.
2. Optimization page for different search audiences Let us continue the above above. example. In addition to preventing repeated content problems, adding the HREFLANG label to the content facing the United States and Australia can also ensure that all search users can find content optimized for them.
Basically, Google can rank in the American version for the people who are searching in the United States, ranking the Australian version for those who are searching in Australia.
Each user can access the page optimized for them, which can also get some additional three -level SEO benefits, such as higher click -through rates and lower jump rates.
3. Benefit from the shared ranking signal
In the Q \u0026 A’s question and answer with Google’s GOOGLES in 2017, Gary hinted that the HREFLANG label can also have a more direct impact on SEO because they are all in The pages in the same HREFLANG cluster will share each other’s ranking signals to some extent.
For example, if you have a lot of links to the English version of the page, these links can also have a positive impact on the Spanish text page (assuming that both pages are combined with hreflang). We don’t know how to share How much , you can say that you are unlikely to get a complete \”link juice\”. But even the small increase of shared ranking signals is worth spending time to set the HREFLANG tag correctly.
Is Hireflang good for SEO?
In short, the correct use of the HREFLANG tag is good for SEO because it can help you optimize the way of searching for your website and create the best experience for searchers.
Google also hints that there may be more direct benefits, such as the page sharing signal on the page in the same HREFLANG cluster.
A real HREFLANG example: Three common situations
We talked about this in the previous section, but let us see some examples, explain when you want you to be on your website Mark with hreflang.
The content of different languages \u200b\u200b
If you have been translated as more on your website The content of the language needs to be added to the HREFLANG tag so that Google knows that these pages are interconnected. In other words, it is the same version of the page, but the language is different. The same language but for the content of different regions As we mentioned in the SEO section, even if your content uses the same language, you may still want to use the hreflang tag. For example, if you provide different versions of pages for English visitors from the United States, the United Kingdom and Australia, you may want to use the HREFLANG mark to specify the area settings of each page.
Contents on different domains/sub -domains
In some cases, you may use sub -domain or completely different domain names to create separate multi -language stations. For example,
yoursite.com
and
yoursite.es
.
You can still use HREFLANG to mark your website together, even if they use the single single order The independent domain name.
General HREFLang implementation skills How to add hreflang to your site depends on your way of building a site. For example, do you start writing your website from scratch? Or are you using a self -custody content management system like wordpress, or a websites such as SquareSpace or Wix? If you are using WordPress, it is easy to use plugins such as TranslationPress to add hreflang tags.
This is a bit complicated for the builders of the custody website. Some website builders will automatically add hreflang to you, while other website builders need you to add manually.
How to make HREFLANG tags?
Before discussing the implementation of the HREFLANG of a specific platform, let’s talk about how to make HREFLANG tags.
When making a hreflang mark, there are two options:
[ 123] Only Language -You can only specify the language of the page by adding its two letters code. For example, \”This is the Spanish version of the page.\” Language and area settings -You can surpass the language, and you can also specify the area settings by adding language code and regional settings code. For example, \”This is the Spanish version of the Mexican page\” and \”This is the Spanish version of the Spaniard page.\”
If you have multiple pages of the same language for different language environments, you need to use the hreflang mark to specify the two.
- However, if you only create a page for all regions, you only need to specify the language. The basic HREFLANG mark format is shown below:
- \u0026 lt; link rel \u003d \u0026 quot; alternate \u0026 quot; hreflang \u003d \u0026 quot; [Url] \u0026 quot; /\u0026 gt;
This is an example of hreflang, indicating the page, indicating the page In all language environments, English:
\u0026 lt; link rel \u003d \u0026 quot; alternate \u0026 quot; hreflang \u003d \u0026 quot; en \u0026 quot; href \u003d \u0026 quot; https: //yoursite.com/hello-world/ \u0026quot;/\u0026 gt;
The following is an example, indicating that the page is Spanish
and Mexicans: \u0026 lt; link rel \u003d \u0026 quot; alternate \u0026 quot; hreflang \u003d \u0026 quot; es-mx \u0026 quot; href \u003d \u0026 quot; https: //yoursite.com/es/hola-mundo/\u0026quot;/\u0026 gt;
National and regional code -For national and regional code, you want to use the ISO code of two letters. All countries code. All language code.
URL
– Make sure that the complete URL is specified, including HTTPS or HTTP parts. How many hreflang labels do you need to add? Google said that you must add all HREFLANG tag
to each version of the content, including the current version.
- For example, suppose you have three versions of one page: English
- People who speak Spanish in Mexico German [123
]
Each version will include all three labels so that Google knows that they are connected in a cluster.
In other words, the English version will still include the English version of the HREFLANG tag ( technically
is
Self -reference
- ), And two HREFLANG tags on the other versions of the page.
Below is an example of hreflang marked on each page in the cluster:
[ 123] \u0026 lt; link rel \u003d \u0026 quot;alternate\u0026quot; hreflang\u003d\u0026quot;en\u0026quot; href\u003d\u0026quot;https://yoursite.com/hello-world/\u0026quot; /\u0026gt; \u0026lt;link rel\u003d\u0026quot;alternate\u0026quot; hreflang\u003d\u0026quot;es-mx\u0026quot ; href\u003d\u0026quot;https://yoursite.com/es/hola-mundo/\u0026quot; /\u0026gt; \u0026lt;link rel\u003d\u0026quot;alternate\u0026quot; hreflang\u003d\u0026quot;de\u0026quot; href\u003d\u0026quot;https:// yoursite.com/de/hallo-welt/\u0026quot;/\u0026 gt; If the pages in the hreflang cluster are not all pointing with each other, Google may ignore the hreflang mark, so make sure that anywhere you need are needed. It is very important to add the HREFLANG mark.
You can use
x-default Hreflang mark to set. This is an example: \u0026 lt; link rel \u003d \u0026 quot; alternate \u0026 quot; hreflang \u003d \u0026 quot; \u0026 gt;
Where do you label HREFLANG?
There are two main positions on the HREFLANG label:
html
– You add the hreflang mark on the site’s \u0026 lt; head \u0026 gt;
Site Map
—— The XML site map you submitted to Google and other search engines contains the HREFLANG mark.
You can also add HREFLANG mark with HTTP header, but this is only for You can host on the server
non -HTML file (eg, p PDF or other documents) Really needed.
In order to get the best results, you may need to mark HREFLANG to add
to the html and XML site maps of your website. This is made by most automated tools
(more about the next
- ).
- This is an example of HREFLANG from Moodle, which is used to add the code to the html \u0026 lt; head \u0026 gt; part:
- You can see that there is any Five HREFLANG tags in different languages, and a default option.
This is an Example of HREFLANG from the XML site map -you can see that the site map contains all different versions of the hreflang cluster. In this case, this is an English-American version and Spanish-Spain’s version:
How to set up hreflang for different websites Now we have introduced some general techniques about HREFLANG’s implementation, let us talk about how to set the hreflang tag for a specific platform, including the following:
WordPress Plaza space wax
Network stream
WordPress Hreflang Guide
If you want to add HREFLANG to WordPress, you can use the translateepress plugin.
Translatepress provides everything to create a multi -language WordPress website. It can help you translate your content manually and/or automatically translate your content through Google Translate or Deepl. It will then create a friendly version of SEO for each language, including automatically adding related HREFLANG tags.
It will add hreflang marks to the HTML of each page and the XML site map from the popular SEO plugin (such as YOAST SEO).
The hreflang labels in the two sample screen screenshots we showed to you in the previous section were automatically generated by Translateepress.
To learn more, please check our WordPress Hreflang tag guidelines. We alsoThere is a tutorial on how to make a multi -language WordPress website with TranslatedPress.
- Get the plug -in
Translateepress Multi -language
The easiest way to add appropriate HREFLANG tags to HTML and site maps on the WordPress website.
or the free version
SquareSpace Hreflang Guide
It is a bit tricky to add dynamic HREFLANG to SquareSpace because it usually needs you through custom definitions. Code manually add the hreflang tag to your page.
You can use this generator tool to generate the correct HREFLANG tag. You need to use SquareSpace’s custom code option to add these tags to the \u0026 lt; head \u0026 gt; part of your website.
If you want to add the hreflang tag to the XML site map of your Squarespace site, this also requires some manual operation. You can use Screaming Frog to capture your Squarespace website and generate XML site maps. You need to manually edit the site map to contain HREFLANG markers.
Unfortunately, SquareSpace cannot handle multi -language websites well at present, which is why Squarespace Hreflang implements a manual solution.
Wax HREFLANG Guide Webflow Hreflang Guide
Webflow uses the same common method as Squarespace, which means that if you are creating a multi -language website, you will manually set the correct HREFLANG tag.
In other words, you need to manually add hreflang to the \u0026 lt; head \u0026 gt; part of each page,If you want to include the HREFLANG mark in the site map, you also need to manually build a site map (using tools such as Screaming Frog).
Immediately began to use the HREFLANG tag
If you have a multi -language website and/or a website that has different contents for different geographical areas, then correctly add the hreflang tag to your website to improve SEO and user experience are very important.
HREFLANG label to use a simple syntax, you can add it to HTML’s \u0026 lt; head \u0026 gt; part and/or xml site map. Just make sure that
all
related HREFLANG tags are added to each page so that the search engine can clearly see how all the versions of the page are connected.
If you use WordPress to build your website, then the easiest way to start using hreflang is to use the translateepress plugin.
If you use Translateepress to create a multi -language website, it will automatically add the appropriate HREFLANG tags to your website’s HTML and XML site map -all these do not need to move your fingers.
To learn more about the hreflang label on WordPress, please check our WordPress Hreflang tutorial.
To understand how to use Translateepress, please check our guidelines and understand how to create a multi -language wordpress website.
Translateepress Multi -language
The easiest way to add appropriate HREFLANG tags to HTML and site maps on the WordPress website.
Get the plug -in
or the free version
Do you have any questions about labeling hreflang or how to use it?
Let’s know in the comments!
If you think this article is helpful, please check our YouTube channel, we will continue to upload a short and easy -to -understand video tutorial. You can also follow us on Facebook and Twitter, so that every time we release it for each time.