1

Is it possible for 2 countries, we can implement hreflang tags on root domain and a sub-folder, for example for US hreflang on www.example.com and for Italy www.example.com/IT can we do it like this?

I have added both urls in Google search console & submitted separate sitemaps, but Google is counting all pages (including sub-folders) for the main domain, so I am thinking that Google is considering main domain (root domain) as a whole website not a country specific as per hreflang.

If you know about this or have similar experience, then Appreciate your help! Thanks, Adil

1

Yes, it’s a common way to do it. Here’s an excerpt from Apple’s homepage tags (US, IT):

<link rel="alternate" href="https://www.apple.com/" hreflang="en-US" />
<link rel="alternate" href="https://www.apple.com/it/" hreflang="it-IT" />

Hreflang is a suggestion, not a directive, so Google will still pick what it thinks is the best content. I would try putting the hreflang annotations on a single sitemap (here’s a good generator):

<?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>https://www.example.com/</loc>
        <xhtml:link rel="alternate" hreflang="en-us" href="https://www.example.com/" />
        <xhtml:link rel="alternate" hreflang="it-it" href="https://www.example.com/it" />
    </url>
    <url>
        <loc>https://www.example.com/it</loc>
        <xhtml:link rel="alternate" hreflang="en-us" href="https://www.example.com/" />
        <xhtml:link rel="alternate" hreflang="it-it" href="https://www.example.com/it" />
    </url>
</urlset>

Also, hreflang values apply at the page level—not site or folder level—and are bi-directional. Each page on your site that has an alternate language version should point to itself and the other version(s)—whether you do it through the sitemap, meta tags on each page, or HTTP headers for each page.

Guides:

| improve this answer | |
  • Thanks a lot Adrian for the great explanation ;-) Its really helpful. – Adil Nilay Sep 30 at 8:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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