The Internet is a global platform; billions of people browse for information, entertainment, and communication purposes, and if your business or site depends on a diverse audience, you need to be able to speak to them. You also need to help Google properly index your site so that visitors can find you. When handling content that has to be translated into different languages, make sure to get familiar with the ‘rel=alternate hreflang=x’ tag.
What is ‘rel=alternate hreflang=x’?
Your site may be multilingual, or translated into several different languages; it can be multi-regional, targeting different geographic areas; or it could be both. A site designed for UK readers and French readers, for instance, would have a version for each language and region. You may also have pages that are in the same language, say English, but have regional differences for readers in the UK or in the US.
This tag helps search engines (Google) return the right version for searchers, whether your site is fully translated or has these regional differences in content. There are a few ways you can do this:
- HTML link. Say our site is: http://www.seoisawesome.com, and we want to translate it into French. We could add a link element to the HTML section so it would look like this: <link rel=”alternate” hreflang=”fr” href=http://fr.seoisawesome.com//>
- HTTP header. For a PDF or non-HTML file, you can use a header like: Link: http://fr.seoisawesome/; rel=”alternate”; hreflang=”fr”
- Sitemap. If you don’t want to mark up your content, you can put this information into the sitemap.
If we were offering a site in English for readers in Great Britain, Ireland, Australia, and the United States, we would likewise indicate which versions readers should see. For example: <link rel=”alternate” hreflang=”en-us” href=”http://en-us.seoisawesome.com/page.html>
The hreflang tag helps Google provide readers with the best version of your website. This is a must for international sites. For more information on using the tag, check out Google.