I have a multilingual PHP site. I have set English as the default language. The language changes automatically according to the browser settings. If it is French, the site will be seen in French.

However in the Google search results, even if I have the browser in French, the English language appears in the results. How can I fix that?

To be clear I don't want to use subdomains or URLs like www.example.com/fr/. I would like it to work like Facebook.

1 Answer 1


Facebook doesn't have to have good SEO. Facebook doesn't need to have lots of content in various languages indexed in Google. If you need to be listed in search engines, don't try to emulate Facebook.

Google doesn't really support crawling and indexing several languages at the same URL. A few years ago Google announced that Googlbot was going to start sending the Accept-Language header. However, Googlebot still doesn't crawl the same URL with multiple different Accept-Language headers as far as I know. On How Google crawls locale-adaptive pages - Search Console Help, Google says in red text:

IMPORTANT: We recommend using separate locale URL configurations and annotating them with rel=alternate hreflang annotations.

I don't know of any sites that get good SEO by basing the language of the site on browser settings. If you want to be listed in search engines, you really must create separate URLs for each language. For how to do that see How should I structure my URLs for both SEO and localization?

The browser settings for language can play some role on your site. When you detect that the user would prefer some language other than the one in the URL, you can show a prominent message at the top of the page in the users preferred language:

This page is in French, but your browser says you prefer English. Click here to view this page in English.

You shouldn't automatically redirect between languages. People usually come into the correct language from links, bookmarks, and search. If the browser settings don't match, the user may have their browser settings wrong. People have them set incorrectly a significant percentage of the time.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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