Reputation: 51292
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"):
Use "301 Moved Permanently"
and redirect it to, say, www.example.com/local.aspx
, or
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?
Upvotes: 3
Views: 180
Reputation: 83729
This may not be the best solution.
From wikipedia it says to use 300 for different languages:
http://en.wikipedia.org/wiki/URL_redirection
http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.3.1
The HTTP standard defines several status codes for redirection:
* 300 multiple choices (e.g. offer different languages) * 301 moved permanently * 302 found (originally temporary redirect, but now commonly used to specify redirection for unspecified reason) * 303 see other (e.g. for results of cgi-scripts) * 307 temporary redirect
Upvotes: 2
Reputation: 655707
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.
Upvotes: 1