Domain Name Configuration for AWS Instance

From ESE205 Wiki
Jump to: navigation, search

In order to present the findings of our project to users, we had to create a domain that was easy to remember and one that anyone could access from any device. This following tutorial is meant to make it easy for you to link your own domain name with your Amazon Web Services Instance.

Step 1: Creating and Registering Your Own Domain Name

I used namecheap.com to create and register my domain name. Once you are on this site navigate to Domains → Registration. Once you are there type in your desired domain name and then you can check for availability and pricing. After you have paid for and secured your domain name, you can then move on to the next step.

Step 2: Allocate an Elastic IP to Your EC2 Instance

After logging in to AWS, select the EC2 option from the main dashboard. Click on "Running Instances" and you should see a list of all of the instances you have created. Click on the instance that you want to connect with the domain you have registered and secured. Scroll to the bottom, and you can see the description tab. Next to the "Elastic IP" label there should be a blank field. This means you must create one. On the left-hand sidebar click on "Elastic IPs" under the "Network & Security" group. Once you do that, click on "Allocate New Address" at the top. Once you have this IP address, click "Actions" then "Associate Address". Then select the instance you want to associate with your Elastic IP Address and click "Associate".

Step 3: Associating Your Domain Name with Your Elastic IP

Scroll to the top of your AWS screen and scroll to "Services". Then click on "Route 53". Click on "Hosted Zones", then "Create Hosted Zone" at the top of the screen. The form you have to fill out will be on the right side of the screen. Enter the domain name as you registered and secured it on Namecheap. Then select "Public Hosted Zone". Route 53 then creates two record sets for you: an NS record set and an SOA record set. Copy and paste the four nameserver entries somewhere you can access later. On this page, click on "Create Record Set" and another form you have to fill out will appear on the right. Leave the name field blank. For "Type" click on "A-IPv4 Address". For "Value" enter your Elastic IP Address. Then click "Create". Next, create another record set, but for the name field put in "www". Fill everything else out the same as before.

Step 4: Merging Your Elastic IP and Domain

Navigate back to Namecheap. Go to your domain dashboard, and locate the domain name that you want to merge with your EC2 instance. Click the "Manage" button on the right. Scroll down on the next page, and find a section labeled "Nameservers". Select "Custom DNS". In the lines that appear underneath copy and paste each of your four nameservers that you put aside in Step 3. Make sure to delete the periods at the end of each server name that AWS adds in.


Now you are finished! Give the merge up to 48 hours (it will likely be much faster).