Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Should a redirect from main domain to language be permanent?

Tags:

http

seo

We build a lot of websites with multiple languages. The URLs look like:

  • example.com/en/
  • example.com/de/

If the user access the main domain example.com our application detects/guesses the user's language and redirects him to one of the above URLs.

Until now we have used a Temporary Redirect (302), because the user can return with other language settings and should then be redirected to the other one. But this will cause search engine crawlers to not pass any link juice (ranking power) along.

It doesn't feel right to do a permanent (301) redirect, but maybe it should be?

like image 457
sspross Avatar asked Oct 31 '22 18:10

sspross


1 Answers

EDIT: Found another question, which advises to use 307. But an answer from google would be nice :P

Maybe I found the right redirection code by myself:

307 Temporary Redirect

In this case, the request should be repeated with another URI; however, future requests should still use the original URI. In contrast to how 302 was historically implemented, the request method is not allowed to be changed when reissuing the original request. For instance, a POST request should be repeated using another POST request.

Other opinions?

like image 101
sspross Avatar answered Jan 04 '23 15:01

sspross