Use same domain for two websites, depending on customer ip

by Daniel Higueras   Last Updated January 13, 2018 13:04 PM

Here's the scenario I want to know if possible and how:

Scenario

  • Domain (www.foo.com) at one hosting provider.
  • Two websites, one at www.bar.com and another one at www.biz.com, each at a different hosting provider.

Actions

  • When a user enters www.foo.com, depending on the ip location, it will load www.bar.com or www.biz.com. It is important that the user sees www.foo.com (masking, not redirecting).
  • So a user from UK would navigate www.foo.com website (which is really www.bar.com) and a user from France would navigate www.foo.com website (which is really www.biz.com).

So far I have managed to find a "fix" which would consist of loading a small website with an iframe at the www.foo.com hosting, and loading the correspondant website in it. I'm wondering if there's a more elegant solution than this.



Related Questions


Why use URL masking in this case?

Updated August 23, 2018 03:04 AM

URL Domain Forwarding or Masking a Single Page?

Updated August 12, 2015 17:01 PM