How To Generate An HTML Hreflang Using Excel – Hreflang Excel Generator Tool

Many people are wondering, especially when a multinational has many subdomains or folders or just multiple domains, how these domains or subdomains or folders appear in the right Google ccTLD.

That can be achieved in two ways: With the use of geo-targeting (using the Search Console) and with the use of hreflang, which admittedly the latter is not widely known.

The hreflang doesn’t have any impact on rankings but it helps you serve the right content to the right audience.

For example how has many folders according to the country that is targeting. Therefore see how Zara works:


For more details about the importance of hreflang and geo-targeting you can read my article for hreflang and geo-targeting.

This article offers a slightly more automated way on extracting the hreflang attribute quicker.

What you need to work on columns: B, D, F. On column H, you will automatically receive the formula for your HTML hreflang:

Column B: Place your URL

Column D: Select the language of the URL

Column F: Select the country of the URL

Column H: Final Function!

All you have to do is to use this function:





Bonus tip: If you want to test the validity of your page that contains the hreflang attribute you can use the Search Console of this tool from Dejan SEO:



UPDATE (26.7.2015):

I have received a lot of questions regarding use of CONCATENATE

Therefore I tried to minimize the length of the spreadsheet and I minimised it in 3 columns, with the formula that you can now see below; hopefully now it’s more user-friendly.

Now with the use of this super simple formula you can now automate the process of generating hreflangs by using only 3 columns. In the 4th column you will get the final result. A sneak peak:

updated hreflang

Until next happy, keep on excelling.

Also read...

Comments are closed.