How can I redirect visitors to different websites based on their country

Hello all, I would like to redirect Canadian visitors to my .ca website and USA visitors to my .com website, how would I be able to do that from the home page? Here’s an example https://www.bestbuy.com/ Best buy will automatically redirect me to the Canadian website if I share my location, this is what I want.

That’s simple! In your website you might follow this same style by adding flag and then you put the link in that image to your desire domain.

Thanks but that’s not exactly what I’m looking for. I want the website to automatically detect the user’s country and forward them to the corresponding website.

Hey Rani, did you get the solution for your requirement, I am dealing with the exact same scenario now. Could you share your solution if any?