HREFLang FAQ’s

Basics of HREFLang Element

The HREFLang element simply tells Search Engines to consider all of the pages listed in the HREFLang element as alternate versions of each other.

For example if you have a product page that is in English and has a global page but also has pages targeting the US, UK and Australia and other than price, dimensions and telephone number the content is nearly the same Google may view these pages as duplicates.

Below is an example of how the HREFLang Meta tag may look for this site on all of the country version pages:

href_element
Alternatively a site may choose to use a HREFLang XML Site map and the following is an example of how the HREFLang XML Site Map would look for the site.

hreflang_sample_xml

Check out the rest of our HREFLang FAQ for any other questions you may have.

Tag:

There is really no wrong answer to this question.  The HREFlang functionality can be implemented either as a meta tag placed in the <head> section of the site, or as an XML site map and there are pros and cons of each.

The meta element is best for sites with only a few language versions as it reduces the number of rows of code that are required on the page. Using the meta element also requires the addition of logic to your page templates to map to the local alternative pages.  While we give instructions on how to develop the tags for your site in our FAQ's our tool does not currently develop them for you.  Our tool is designed to build the XML file versions.   If you have a smaller site and want to use the in page tags we suggest you use the HREFLang Tag Generator by developed by Aleyda Solis.

THE XML site map approach is best for sites that have numerous language versions and/or don’t have the ability to build the logic to add the meta elements, the site map method is the easy way to go.

Tag:

When developing your HREFLang elements ensure that you are using the correct 2 letter country and regional codes based on ISO 3166-1 Alpha-2 standards.  Using incorrect country codes will result in Search Engines ignoring your listings.

You will also need to ensure you are using the correct Language codes as this is one of the most common errors we find on sites that assume the country code is the same as the language codes.

Tag:

Are country and language statements case sensitive? For example, Eg: hreflang=”en-gb” vs hreflang=”en-GB or hreflang=”EN-GB”

No they are not case sensitive and search engines will accept both. However, the standard syntax does typically show the country/region in upper case for example for the UK it can be hreflang=”en-GB” where the language is in lower case and the country/region in upper case both both versions are accepted.

Tag:

When developing your HREFLang elements ensure that you are using the correct language codes based on ISO 6391-1 standards.  If you use an incorrect code you will get and error and Google will ignore your listings.

You will also need to ensure you are using the correct country codes as this is one of the most common errors we find on sites that assume the country code is the same as the language codes.

Tag:

It was really designed for large sites that have many pages in multiple languages.   If you have a large site with more than 1,000 pages translated into 5 languages would be at 25,000 rows in your HREF XML.  One option we have in our too is to create a individual XML Site Map for each country and use an site map index file to manage them.  While this increases the number of files, it does keep the individual file sizes smaller as well as allowing you to track errors and index rates.

However, if you do wish to have a single XML site map the maximum size, by Site Map.org file size standards, is still 50,000 rows or 10MB (10,485,760 bytes) uncompressed.  If you have more than 50,000 rows, you will need to break the HREF into multiple files and use a site map index page.  The site map index page can have up to 1,000 individual XML site maps.

Our experience suggests keeping your file sizes below 10,000 URL's per XML site map as this makes them easier to index.   Our HREFlang Builder allows all of these options to be used.

Tag:

HREFlang element is recommended if you have any of the following conditions:

1. The same content on different country version sites in the same language typically with just currency variations for GBP and USD
2. The same content in different languages on the same site or different country versions

Tag:

It does not help with ranking a page that is not currently ranking in any language. However, if a global page or a a different country is ranking, using a HFREFLang element will make the replace the global page with the correct local language version page rank in the same position. Let me try to explain.

A common problem for companies is their global or US page ranks #1 in Australia rather than their actual Australian /au/product1.html page. This can happen for a number of reasons such as links and history. Using the HREFLang feature Google will detect the Australian page and then replace the US page with the same Australian page.

Tag:

The HREFLang functionality can be implemented either as a meta tag placed in the section of the site or as a XML site map.  The meta element is best for sites with only a few language versions as it reduces the number of rows of code that are required on the page. Using the meta element also requires the addition of logic to your page templates to map to the local alternative pages.

For sites that are numerous language versions and/or don’t have the ability to build the logic to add the meta elements the XML site map method is the easy way to go.

Each page needs to be mapped to its language alternative that is where the problem start. There are hundreds of possible problems but the following are the most common and the main reason for Google’s latest batch of error notices.

The meta element is best for sites with only a few language versions as it reduces the number of rows of code that are required on the page. Using the meta element also requires the addition of logic to your page templates to map to the local alternative pages.

Tag:

Yes, as many sites use top level country domains with the same or similar content search engines allow and understand you to do it.

Note: this is one of the advantages of using our HREFLang tool is that we can map these across top level domains easily.

Tag:

Yes, you can use it and it is strongly encouraged if you have a global version of your site.

<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml">
  <url>
    <loc>http://www.example.com/myproduct.html</loc>
#This is the example of the global page and the corresponding x-default entry    
     <xhtml:link 
                 rel="alternate"
                 hreflang="x-default"
                 href="http://www.example.com/myproduct.html"
                 />
    
    <xhtml:link 
                 rel="alternate"
                 hreflang="en-gb"
                 href="http://www.example.com/uk/myproduct.html"
                 />
    <xhtml:link 
                 rel="alternate"
                 hreflang="en-us"
                 href="http://www.example.com/us/myproduct.html"
                 />
    <xhtml:link 
                 rel="alternate"
                 hreflang="en-au"
                 href="http://www.example.com/au/myproduct.html"
                 />
  </url>
  
  <url>
    <loc>http://www.example.com/uk/myproduct.html</loc>
     <xhtml:link 
                 rel="alternate"
                 hreflang="x-default"
                 href="http://www.example.com/myproduct.html"
                 />
    
    <xhtml:link 
                 rel="alternate"
                 hreflang="en-gb"
                 href="http://www.example.com/uk/myproduct.html"
                 />
    <xhtml:link 
                 rel="alternate"
                 hreflang="en-us"
                 href="http://www.example.com/us/myproduct.html"
                 />
    <xhtml:link 
                 rel="alternate"
                 hreflang="en-au"
                 href="http://www.example.com/au/myproduct.html"
                 />
  </url>
  
  <url>
    <loc>http://www.example.com/us/myproduct.html</loc>
     <xhtml:link 
                 rel="alternate"
                 hreflang="x-default"
                 href="http://www.example.com/myproduct.html"
                 />
    
    <xhtml:link 
                 rel="alternate"
                 hreflang="en-gb"
                 href="http://www.example.com/uk/myproduct.html"
                 />
    <xhtml:link 
                 rel="alternate"
                 hreflang="en-us"
                 href="http://www.example.com/us/myproduct.html"
                 />
    <xhtml:link 
                 rel="alternate"
                 hreflang="en-au"
                 href="http://www.example.com/au/myproduct.html"
                 />
  </url>
  
    <url>
    <loc>http://www.example.com/au/myproduct.html</loc>
     <xhtml:link 
                 rel="alternate"
                 hreflang="x-default"
                 href="http://www.example.com/myproduct.html"
                 />
    
    <xhtml:link 
                 rel="alternate"
                 hreflang="en-gb"
                 href="http://www.example.com/uk/myproduct.html"
                 />
    <xhtml:link 
                 rel="alternate"
                 hreflang="en-us"
                 href="http://www.example.com/us/myproduct.html"
                 />
    <xhtml:link 
                 rel="alternate"
                 hreflang="en-au"
                 href="http://www.example.com/au/myproduct.html"
                 />
  </url>
  
</urlset>

Tag:

The order of the URL's and entries does not matter in the HREFLang Element meta tag nor the XML site map.  They are all treated equal.

I typically sort them by the hreflang= so that it is easy to troubleshoot missing URL's.

Tag: