Sending visitors to their country domain

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.

Anyone done this before?

Hi @krubens

I have not done this before. You will need custom code to do it.
Does this article helps in any way?

Good question :slight_smile: I guess thats what I need help with. In clear language. I can find a lot of codes out there, but none that I understand how I implement :slight_smile:

I’ll try something out and get back shortly :smiley:


Thank you @jorn! That would be amazing!

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.

That is very true! And very annoying when you get redirected but don’t want to. Hmm… So a flag link options might be better for me.

But for others, let say the IP is the best way to go forward. Did you find a solution you think can work. :slight_smile:

Yeah I think API from the Medium link can work. But I’m not a developer and didn’t get it :sweat_smile:
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.

Ok thank you! :slight_smile: Lets see if there is someone in here with a heart of gold :slight_smile:

1 Like

Maybe you with this method could make pop-up asking the visitor if he wants to open the page in his language instead of doing a redirect.

1 Like

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.

The tool is easy to set. You don’t have to code.

Hope it helps!


Hi :slight_smile: I went with GeoTargetly actually :slight_smile: Easy to implement and works great! Thank you!

1 Like