0

I would like to know if is possible to have one website hosted on aws for example www.myname.com but then to have the possibility to map different domains to different paths. for example: map domain www.hellogeorge.com (just an example) to www.myname.com/george then another person to map his domain www.otherdomainchristian.com to www.myname.com/christian

i want to say that the www.myname.com/name is an api end point which generates an html webpage depending on the specific parameter used. If such tecnologies are present may somebody guide me what to learn, study? Thank u very much.

Ticu Ionut
  • 17
  • 3

1 Answers1

0

Well, it's pretty simple to do. You can use S3 bucket static web hosting to do the redirection. For example,

map domain www.hellogeorge.com (just an example) to www.myname.com/george

Create an S3 bucket called www.hellogeorge.com and then set redirection domain/path to www.myname.com/george

then another person to map his domain www.otherdomainchristian.com to www.myname.com/christian

Create another S3 bucket called www.otherdomainchristian.com and then set redirection domain/path to www.myname.com/christian

Now, when a user visits www.hellogeorge.com or www.otherdomainchristian.com, he/she will get a 301 redirection to the corresponding destination.

Next, you can use Amazon API Gateway to generate dynamic response depending on the request parameter.

jellycsc
  • 10,904
  • 2
  • 15
  • 32
  • Thank u very much for ur answer, may i ask, what will be the final link which the user will see in his browser after redirect? – Ticu Ionut May 10 '20 at 15:28
  • @TicuIonut The user will see `www.myname.com/` after redirection. – jellycsc May 10 '20 at 15:31
  • then it's my fault for not explaining this better, is it possible to do this in such way the user will use and see his own domain in the browser, like it would be another website? – Ticu Ionut May 10 '20 at 15:36
  • @TicuIonut Well then, you need a webserver (like apache and nginx) to set up a reverse proxy to achieve this. The S3 approach described above won't work. – jellycsc May 10 '20 at 16:00
  • thank u very much, i will study this. anyway i can't find the button to mark this comment as solution. – Ticu Ionut May 10 '20 at 16:15