Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

For a multilingual site In my sitemap I am using:

<url>
  <loc>http://www.xxxx/en</loc> 
  <changefreq>daily</changefreq> 
  <xhtml:link rel="alternate" hreflang="en" href="http://www.xxxx/en" />  
  <xhtml:link rel="alternate" hreflang="it" href="http://www.xxxx/it" /> 
  <xhtml:link rel="alternate" hreflang="gr" href="http://www.xxxx/gr" /> 
</url>
<url>
  <loc>http://www.xxxx/it</loc> 
  <changefreq>daily</changefreq> 
  <xhtml:link rel="alternate" hreflang="en" href="http://www.xxxx/en" />  
  <xhtml:link rel="alternate" hreflang="it" href="http://www.xxxx/it" /> 
  <xhtml:link rel="alternate" hreflang="gr" href="http://www.xxxx/gr" /> 
</url>

Also in the <head> of the page I am using the <link> tag : Two questions:

  1. Do I need to just keep it in one place or it is better to have it in both (I know that Google will support in under sitemap but what about the other search engines?)

  2. Do I need to do this for every page that has an alternative version e.g:

    <url>
      <loc>http://www.xxxx/it/test.php</loc> 
      <changefreq>daily</changefreq> 
      <xhtml:link rel="alternate" hreflang="en" href="http://www.xxxx/en/test.php" />  
      <xhtml:link rel="alternate" hreflang="it" href="http://www.xxxx/it/test.php" /> 
      <xhtml:link rel="alternate" hreflang="gr" href="http://www.xxxx/gr/test.php" /> 
    </url>
    

    or Google will automatically index the rest traversing down from the main page?

share|improve this question
    
Do you have a source that says <xhtml:link> element is a valid element? –  DisgruntledGoat Feb 12 at 11:46
1  
1  

1 Answer 1

up vote 1 down vote accepted

I assume you mean you're using <link> elements in your HTML (as opposed to the <xhtml:link> for sitemaps).

Using the alternate links in the sitemap is beneficial for search engines only, whereas the links in the <head> of your web page could be used by browsers or other user-agents. I believe Opera used to make use of link elements but I don't know if that's still the case now they switched to the Chromium engine.

I would recommend using both anyway. There are likely to be other search engines that don't understand the xhtml:link elements in sitemaps, but do understand standard link elements.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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