: Preventing Google from indexing ".com" instead of ".com/fr" or ".com/en" I followed the recommendation of Google concerning multilingual website, I have: www.example.com/fr in french www.example.com/en
I followed the recommendation of Google concerning multilingual website, I have:
example.com/fr in french example.com/en in english example.com automatically redirects (header) either to example.com/fr or example.com/en.
In my sitemap.xml, I have not mentionned example.com but instead the two subdirectories, still following Google on sitemap policy:
<url>
<loc>http://www.example.com/fr/</loc>
<xhtml:link rel="alternate" hreflang="en" href="http://www.example.com/en/"/>
<xhtml:link rel="alternate" hreflang="fr" href="http://www.example.com/fr/"/>
<changefreq>daily</changefreq>
<priority>1.00</priority>
</url>
<url>
<loc>http://www.example.com/en/</loc>
<xhtml:link rel="alternate" hreflang="fr" href="http://www.example.com/fr/"/>
<xhtml:link rel="alternate" hreflang="en" href="http://www.example.com/en/"/>
<changefreq>daily</changefreq>
<priority>1.00</priority>
</url>
Problem is that in Google, the main results is example.com. For many websites, Google displays for the first results .com/fr or .com/en depending our location but not juste .com.
I was thinking of using Webmaster Tools and try remove example.com but I'm not sure since example.com is not really a sitelink and I'm afraid it will juste remove my site from Google. Do I miss something? Or maybe I should just wait?
More posts by @Speyer207
2 Comments
Sorted by latest first Latest Oldest Best
You need to include the "/" URL in your Sitemap file and specify it as the hreflang "x-default". That way, Google will know that this is a part of your set of pages, and will be able to handle it appropriately. Note that hreflang is a signal, and not a directive for Google, so it might be that the "/" URL still occasionally shows up.
Your general setup sounds fine. A few things to check:
When you do your geo-IP redirects, ensure that they are the "301 permanent" variety. If you are using 302 temporary redirects, Google will be hesitant to change the URLs
Test Googlebot specifically.
I tend to use a command line program like curl to test these items. Make sure the information you get back looks similar to the following:
curl --head --user-agent 'Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)' example.com/ HTTP/1.1 301 Moved Permanently
Location: example.com/en/
If you need to make any additional changes, it may take Googlebot a week to realize the home page has moved and a month or more to get to all the pages on the site.
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.