I have a website and I want to make it identify the user’s location and according to that move the user to the correct subdomain.
An example:
If I go to the website from France, I want it to redirect me to http://www.website.com/France
and throw on…
How can I do that please?
At the application server level you can find out which country the user is from by looking it up in a ip-2-country database. They are usually products you buy from a software company specializing in this with different databases for different needs.
Here is one: ip2country
You can also do this on a dns-level if you have a dns provider that can do this for you. This is probably what makes most sense for you. Then your visitors would at once be sent to the nearest server without having to contact a “dispatcher” server first (the dns server would be the router) and after that the correct ip would be cached at some way between the dns server responsible for the domain and dns server along the way all the way to the user.