amazon-web-servicesamazon-route53domain-mapping

AWS, map multiple domains to one website but different path


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.


Solution

  • 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.