bigpotato
bigpotato

Reputation: 27507

Domain + AWS EC2: How to make www.mydomain.com point to my EC2 server?

I'm trying to create a website and I just bought a domain at domain.com. I also launched an EC2 instance in AWS. Which one of the options would I choose below so that going to www.edmundscoolsite.com would point to my EC2 instance?

enter image description here

Upvotes: 2

Views: 95

Answers (2)

Ben Whaley
Ben Whaley

Reputation: 34416

There are actually a couple of options here.

The best option is to associate an elastic IP address with your EC2 instance, then use an A record. The EIP is yours until you release it, even if you replace your instance.

An alternative option is to make www.edmundscoolsite.com a CNAME record whose value is the public DNS for your EC2 instance, something like ec2-1-2-3-4.us-west-2.compute.amazonaws.com. When you replace your EC2 instance the CNAME will no longer be valid, however, which is why the first option is better.

Upvotes: 3

sylwester
sylwester

Reputation: 16498

In order to point www.edmundscoolsite.com to your EC2 instance, you can add a CNAME or A record.

more here : https://forums.aws.amazon.com/thread.jspa?threadID=87279

Upvotes: 1

Related Questions