Search code examples
asp.nethttp-redirectlocalizationgeolocationhttp-status-code-301

Should I use 301 for in-site redirects?


We would like to redirect to a localized version of our entry webpage if IP is detected to be from a certain country. We are using ASP.Net, GeoLite Country Db (it's a very small, 1Mb downloadable DB at time of writing this question).

So, most users would get english content, but if they come from a local place, they would have local content served by default. Of course, they would be able to change the preferred language at any time.

The question is: if www.example.com by default displays default.aspx, should we (if we detect the IP to be "local"):

  1. Use "301 Moved Permanently" and redirect it to, say, www.example.com/local.aspx, or

  2. Simply render the appropriate content inside default.aspx?

We would like to know if there are some side effects with SEO or similar issues with any of the approaches?


Solution

  • I would just deliver the localized contents of local.aspx and send an appropriate Content-Location referring to local.aspx along with it.

    Or, if you want a redirect, use the status code 307 to indicate a temporary redirect.