There are a couple of questions about this topic here, but I couldn't find an answer that is specific to my question.
So, I'm building a website which currently only supports one language, but I want to make it bi-lingual, meaning every page will be available in two languages. Each page will have the same contents, only translated in two languages. What I want to do is detect the language of the browser in my PHP-script and serve the different versions based on that (there will probably be a button to switch the language as well). However, with that approach, both versions of the same page would share one URL (e.g. example.com/about
would show either versions of the page, depending on the user's browser language and/or a session/cookie). Is that bad for SEO-purposes? And are there any other downsides that I'm not aware of?
I'm asking this as given the way the project is laid out, it would be not that easy to make the second version of each page available over a different URL (e.g. example.com/en/about
or en.example.com/about
). If the approach above is not advisable, would it be a viable alternative to determine the language by a URL parameter, e.g. example.com/about?l=en
(where the script defaults to my local language if no parameter is passed)?