I'm about to turn my website into one that's for multiple languages. I read these two points from Google Search Central which I find rather conflicting.
The first point states:
Use different URLs for different language versions Google recommends using different URLs for each language version of a page rather than using cookies or browser settings to adjust the content language on the page. If you use different URLs for different languages, use hreflang annotations to help Google search results link to the correct language version of a page. If you prefer to dynamically change content or reroute the user based on language settings, be aware that Google might not find and crawl all your variations. This is because the Googlebot crawler usually originates from the USA. In addition, the crawler sends HTTP requests without setting Accept-Language in the request header.
And the second point states:
Avoid automatically redirecting users from one language version of a site to a different language version of a site. For example, don't redirect based on what you think the user's language may be. These redirections could prevent users (and search engines) from viewing all the versions of your site.
If I'm using different urls to satisfy different languages, wouldn't it make sense to redirect the user to the correct language if the default language is not easily understood?
Also what's even more confusing is that google violates its own guideline. How? because if you change your preferred language in your browser settings then load the google homepage, it will pick the first language in the accept-language HTTP request header and serve the home search page in that language. In a sense that is almost like a redirect.
You can confirm this on a command line by executing this command, replacing es with your 2-character language of your choice:
curl -H "Accept-language: es" https://www.google.com
Then somewhere in the first 250 bytes of output you'll see:
<html itemscope="" itemtype="http://schema.org/WebPage" lang="es-419">
Assuming I can serve the page both in french and english, and someone with a web browser that accepts french pages only wants to browse my website.
What am I supposed to do to make google happy? Do I:
- Follow google's recommendation and show the english version then pray the reader can understand just enough english to select the french option,
OR
- Copy Google's idea by serving the french page because the browser reported that it accepts french pages only?