Let say example.com has two different country version apart from main English version

  1. Israel(example.il)
  2. New Zealand(example.nz)

What SEO practice should I follow.

Method 1 - HTML lang

<html lang="en">
<html lang="he-IL">
<html lang="en-NZ">

Method 2 - HTML hreflang link inside head tag example.com

<link rel="alternate" href="http://example.com/" 
      hreflang="en" />
<link rel="alternate" href="http://example.il/" 
      hreflang="he-IL" />
<link rel="alternate" href="http://example.nz/" 
      hreflang="en-NZ" />

similarly use the same for other pages(example.il,example.nz).

Google says from 2011 they started treating link with hreflang for mentioning language specific content. Now Which method should I use to make the site language and country specific when it comes to search engines?

What is the difference between <html lang> and <link hreflang> ?

1 Answer 1


Which method should I use ...

What is the difference between <html lang> and <link hreflang>.

You can use both.

The lang attribute on the html tag informs user-agents the language of the current document.

The hreflang attribute informs user-agents/bots of the location of alternative localised versions of the current document.

In a way they are complementary.

However, Google most probably ignores the lang attribute and auto-detects the document language instead. I believe Google ignores all language identifiers, except for hreflang.

hreflang on the other hand is recommended by Google to help indexing of multi-lingual websites. So, if you needed to choose one or the other then the hreflang would be the one to go for.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.