In my site when someone access directly the domain.com
or any other url that does not contain country indication like domain.com/contact
, the language content is shown based on his IP. for example if he lives in UK, he will get the included UK translated file. Likewise, if lives in Italy and access directly the domain.com
or domain.com/about
will get the IT translations.
After this first visit, all other links are built based on country, meaning domain.com/it/faq
and I save the language in a session.
So basically, urls without country will load the language file based on IP. If the criteria are not met, the UK language file will be loaded as a default.
This is how my hreflang looks
<link rel="alternate" href="domain.com/en/contact" hreflang="en"> <link rel="alternate" href="domain.com/it/contact" hreflang="it"> <link rel="alternate" href="domain.com/contact" hreflang="x-default">
Question:
In my country is more often to use a mix of languages on search queries. Should I create a multilingual xml sitemap for better SEO or just create a sitemap with all links in all languages?
Is this the way to do this?
<url>
<loc>https://www.domain.com/what-we-do</loc>
<xhtml:link rel="alternate" hreflang="x-default" href="https://www.domain.com/what-we-do" />
<xhtml:link rel="alternate" hreflang="en" href="https://www.domain.com/en/what-we-do" />
<xhtml:link rel="alternate" hreflang="it" href="https://www.domain.com/it/what-we-do" />
</url>
UPDATE AFTER MIKE SUGGESTION
<url>
<loc>https://www.domain.com/our-work</loc>
<xhtml:link rel="alternate" hreflang="en" href="https://www.domain.com/en/our-work" />
<xhtml:link rel="alternate" hreflang="it" href="https://www.domain.com/it/our-work" />
</url>