HREFLang FAQ’s

Using HREF Builder

There are a few key reasons for pages to be missing from and HREFLang XML Site map that HREF Builder generated

1.  The URL did not have a country match – we exclude any page that does not have a match in another country – note, we are adding a feature in a future release that will allow you to keep single URL’s.
2.  The URL did not render a 200 header status code, it was either a redirect or a page not found status.
3.  You have localized folders or page names.  We use a folder/page matching process to map the pages to each other and we are currently not able to match local language versions across markets.

Category:  Using HREF Builder
Tag:

Unfortunately, No it is not possible.  Without common page names across the countries we are not able to pair them to each other.

Note:  According to Google,  they would not consider them to be alternative URL’s either so it would not generate HREFLang types of errors.  You may still have duplicate content issues as the content on the page is exact or near match.

If you have common page names in English but local language directories we can map those pages by using the regex or language removal function to take them out.

Category:  Using HREF Builder
Tag:

If you don't have separate country and language versions of your site but simply have a global Spanish, French or Arabic language version that covers all markets you can easily set that in the tool.

To set the file as a Global Language simply click the "Country Language Selector" and scroll until you find the Global Version of that language.   In this case, the site is only in French and the user wants it to be seen in all markets where French is appropriate.

global_language

Category:  Using HREF Builder
Tag:

If you open the view for your HREF XML account and it is full of red rows it is due to the tool not being able to detect the country or language.   For example, if your site uses the format of www.mysite.com/ar/page.html and you use the syntax of language then the tool would assume this is an Arabic site but does not know for which country.

If you had set this as a country in which case/ar was for Argentina, we do not know of the site is in Spanish or English.  So you would need to tell is which it is.

country_language_not_detected

To set the country or language simply click Edit File to bring up the entry for this source file.   Click the Country Language selector and scroll to find "Global Arabic"  this is will create the HREFLang entry <link rel=”alternate” hreflang=”ar” href=”http://www.example.com/ar/” />

global_language

In the second case, if this is actually for Argentina, you do the same thing, click "Edit File" and bring up the entry for the source file.

select_country_language

Click the Country Language selector and scroll or type "Argentina" to find "Argentina"  if the site is for Argentina but in English choose Argentina English this is will create the HREFLang entry <link rel=”alternate” hreflang=”en-AR” href=”http://www.example.com/ar/” />

If the site is for Argentina and in Spanish, select Argentina Spanish this is will create the HREFLang entry <link rel=”alternate” hreflang=”es-AR” href=”http://www.example.com/ar/” />

Category:  Using HREF Builder
Tag:

Common Errors

HREFLang Return Tags are Missing is the most common error shown in Google Webmaster tools for sites that do not have all the pages mapped. Remember, each country/language page is an alternative of all the others so Google expects you to have all of them represented. If you have local sites with 20 pages each then each of the 20 pages on this site must be mapped to each other in order to pass the test.

In the meta element, each version must be listed on each others country language version.

In the XML site map, some of the free tools only create one direction versions and not multi direction which is the case of most of these errors.

Category:  Common Errors
Tag:

Another big batch of errors comes from the incorrect coding of language or region codes.   The two most common ones are designations for the United Kingdom and Japan. Nearly every website uses “/uk” to designate their UK pages. However, for the HREFLang element you must use the country/region ISO code for the UK, which is actually “GB.”

Similar problem with Japan, nearly every HREFLang developed for Japanese pages use JP, which is the country code, but the language code is “JA” and that is what must be used to designate Japanese language.
When developing your HREFLang elements ensure that you, or the tool you use, is correctly mapped to the language and country. You can validate this using the list of languages using ISO 6391-1 and for regions/countries which use the ISO 3166-1 format. There are many other smaller problems and nuances with the HREF element, and it is best that you review all of the criteria and understand the implications of using this element as explained by Google in their HREF Language Support page.

Another big batch of errors comes from the incorrect coding of language or region codes.   The two most common ones are designations for the United Kingdom and Japan. Nearly every website uses “/uk” to designate their UK pages. However, for the HREFLang element you must use the country/region ISO code for the UK, which is actually “GB.”

Similar problem with Japan, nearly every HREFLang developed for Japanese pages use JP, which is the country code, but the language code is “JA” and that is what must be used to designate Japanese language.

When developing your HREFLang elements ensure that you, or the tool you use, is correctly mapped to the language and country. You can validate this using the list of languages using ISO 6391-1 and for regions/countries which use the ISO 3166-1 format. There are many other smaller problems and nuances with the HREF element, and it is best that you review all of the criteria and understand the implications of using this element as explained by Google in their HREF Language Support page.

Category:  Common Errors
Tag:

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: