Has anyone here implemented some code to redirect visitors to their country website. So my client have three websites. no, se, dk. Norway, Sweden and Denmark. When a person located in Denmark goes to the .no site. we want that visitor to be sent to the dk site automatically.
Ok haven’t really tried anything yet but did some reading and you have to do choice on which method to use.
The IP adress method. Checks from which country the computer is in and redirects to the right adress. Problem could be that a visitor actually wants to read the English site not the Swedish.
The browser language method. Checks what language the user has set in the browser settings. Problem could be the same as above. What if the user wants to visit the .com and not the .se.
I’ll guess it depends on the project and the user.
Yeah I think API from the Medium link can work. But I’m not a developer and didn’t get it
Asked quickly a developer where I work and he said it looks good but it’s not a 5 min projekt to set it up.
Hi here is the tool can do exactly what you want: Geo Redirect.
It can identify your visitors’ physical locations like country, state, city by IP, and further direct your visitors to different URL webpages based on their locations. In your scenario, visitors from Norway, Sweden, and Denmark can seamless be directed to no, se, and dk websites accordingly.