• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 171
  • Last Modified:

Can I point more than one domain name to an instance on AWS?

I'm looking to use AWS free tier for developing my sites on (moving from a current shared server).

1. I have example.com, example.ca, and example.org domain names. I'd like all these to point to my free tier t2.micro instance so that anyone entering these domains will land on my index page.

Does AWS allow this? If so, how?

2. I have 3 domain names:
example_dev.com for development
example_beta.com for my beta testers to use as I develop the next phase
example_launch.com as the eventual domain for users to use as I continue work on example_dev.com and example_beta.com.

Do I need separate AWS instances to do this, or can I somehow use one free tier instance and redirect each domain request to its own index_dev.php/index_beta.php/index.php page?
0
Torquil Beavis
Asked:
Torquil Beavis
  • 2
3 Solutions
 
Phil PhillipsDirector of DevOps & Quality AssuranceCommented:
For #1, yes you can. Easiest way would be to have the webserver handle it for you. You can do this with "virtual hosts" with apache, or "server blocks" with nginx.

For #2, you can also use virtual hosts/server blocks for that (each separate domain gets its own root).  However, I'd be careful with that. If the code on one of the domains misbehaves and/or the instance goes down, then all of those domains are affected.
0
 
António SargentoChief ArchitectCommented:
1. On the DNS that hosts your domains you need to create a CNAME record or a A record that points to the t2.micro address.
If your t2.micro have a IP address, then create a A record. Otherwise create a CNAME.
0
 
Torquil BeavisBusinessAuthor Commented:
António, if I want to use https for every page on each web site, how is this done on AWS? I do not have my own SSL certificates at this point of development.
0
 
António SargentoChief ArchitectCommented:
You can use the Certificate Manager to generate one.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Managing Security Policy in a Changing Environment

The enterprise network environment is evolving rapidly as companies extend their physical data centers to embrace cloud computing and software-defined networking. This new reality means that the challenge of managing the security policy is much more dynamic and complex.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now