Setting Up Your AWS Hosted Domain Name Record (DNS)

How to setup your domain name record (DNS) via the Amazon Web Services (AWS) console.

What You Will Need Before You Start

Before you update or setup your DNS record for the first time you will need the following information:

  • Login details for your AWS console, which is not provided by Aurora Commerce.

  • The Fully Qualified Domain Name (FQDN) of the Load Balancer that sits in front of your website, this will be provided by Aurora Commerce.
    For example, it will look like this: 

    Web-123456789.eu-west-n.elb.amazonaws.com
    

Follow These Simple Steps:

  1. Log into the AWS Console using your account credentials.
    https://console.aws.amazon.com
  2. Navigate to the Service Route 53 which is AWS's DNS record management.
  3. Click on the Hosted Zones link to view the different domain names (zones) that you have hosted under Route 53
  4. Select the zone (domain name) you wish to manage and you will be taken to the main DNS record editing window.
  5. Click the Create Record Set button which will open the form on the right hand side
  6. Leave the name blank to create a record for the main domain such as "example.com". If you enter something for the name you will be creating a subdomain record. For example entering "foo" in the name box will be creating a record for "foo.example.com" rather than "example.com".
    Make sure that the Type is set to "A - IPv4 address" so that you are creating an A record.
  7. Make sure that the Alias "Yes" radio button is selected (as shown above)
    Then in the Alias Target box paste in the Load Balancer FQDN that Aurora Commerce provided. You may notice that the word "dualstack" is automatically prepended to the FQDN you entered. This is OK.
  8. Hit the Create button. You're all done!

What you have done is created an alias A record. If you do a check for this domain name it will return the IP address of the Load Balancer. Using an alias means that your domain record does not have to update if the load balancer IP address changes.

How To Verify Your Domain Name Record:

Let's assume your domain name is "example.com", and that the FQDN of the load balancer is "Web-123456789.eu-west-1.elb.amazonaws.com"

Below we show a number of ways of checking that your domain example.com is properly setup.

How to Check Your DNS Record Using an Online Tool

There are lots of online tools available. Simple Google "Online DNS checker"

Example: https://mxtoolbox.com/DNSLookup.aspx

Step 1. Enter the FQDN of the Aurora Commerce Load Balancer: 

We have blurred out the full IP address for security reasons but you can see that there are two IP addresses shown. One ending 104 and the other 188. Your load balancer may be different. You'll also see that the Type is A shown in the left column above. 

Step 2. Now check the results for your domain name like "example.com". Obviously replace example.com with your actual domain name.

What we see above is that the domain name has the same IP addresses as the load balancer! This is a success!

How to Check Your DNS Record Using the Command Line (Linux or Mac OS X)

On the command line on unix based systems you usually have a program called "dig" which can provide DNS information. We can repeat a similar process as we did above only quicker on the command line. 

Usage:

dig <domain-to-test>

Example:

$ dig Web-123456789.eu-west-1.elb.amazonaws.com
; <<>> DiG 9.8.3-P1 <<>> Web-423109762.eu-west-1.elb.amazonaws.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 7948
;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;Web-123456789.eu-west-1.elb.amazonaws.com. IN A

;; ANSWER SECTION:
Web-123456789.eu-west-1.elb.amazonaws.com. 60 IN A XX.XX.XX.104
Web-123456789.eu-west-1.elb.amazonaws.com. 60 IN A XX.XX.XX.188

;; Query time: 35 msec
;; SERVER: 62.24.134.1#53(62.24.134.1)
;; WHEN: Thu Nov 30 11:12:04 2017
;; MSG SIZE  rcvd: 91

What we see above in the ANSER SECTION is that the load balancer returns two IP addresses as expected. They have been obfuscated for security.

Repeating the query for your domain name should return the same two IP addresses.

Note you may only see 1 or more than 2 IP addresses. But the key thing is that the result returned for your domain should match the result returned for the load balancers FQDN. The order of the results can vary.