I have a website (Single-Page Application) in VueJS, and want to implement localized versions with URLs like these:
I'm trying to figure out if I can redirect user to his local version depending on his Accept-Language
Google suggests to:
Avoid automatic redirection based on the user’s perceived language. These redirections could prevent users (and search engines) from viewing all the versions of your site
however it looks like some sites (e.g. Microsoft, TeamViewer) do this via 302
HTTP redirection.
I also consider the option to redirect via JavaScript pushState method (change URL without page reload).
So my questions are:
- would redirection to user's personal language version harm SEO?
- which redirection method would be preferable (HTTP
301
redirection, HTTP302
redirection, JavaScriptpushState
)?
de
, do you want to redirecthttp://example.com/
or alsohttp://example.com/en
andhttp://example.com/it
?/
to/de
. If language indicator already exists in URL, it should not be changed. "SPA" tag was added because I also consider changing URL via JS without page reload (the same way as all links behave in my app)