with Amazon Route 53

In this tutorial you will register a new domain name for your website. You will then connect that domain name through the Domain Name System (DNS) to a currently running EC2 instance (such as a WebApp, or website running WordPress, Apache, NGINX, IIS, or other Website platform). If you already have a domain name registered, do step 1 and then refer to your domain registrar’s documentation for how to set the DNS record for your new site.

Cost implications:

There's an annual fee to register a domain, ranging from $9 to several hundred dollars, depending on the top-level domain, such as .com. For more information, see Amazon Route 53 Pricing for Domain Registration. This fee is not refundable.

When you register a domain, we automatically create a hosted zone that has the same name as the domain. You use the hosted zone to specify where you want Amazon Route 53 to route traffic for your domain. The fee for a hosted zone is $0.50 per month. You can delete the hosted zone if you want to avoid this charge.

Getting a Domain Name with AWS Requires an Account

Create a Free Account in Minutes

Receive twelve months of access to the AWS Free Usage Tier and enjoy AWS Basic Support features including, 24x7x365 customer service, support forums, and more.

 

Note: If you are using Elastic Load Balancing (Elastic Load Balancing is done automatically if you launched your app with Amazon Elastic Beanstalk) then you do not need to obtain a static IP address and can go directly to step 2.


a. Click here to open the Elastic IP part of the EC2 console in a new window and click Allocate New Address.

Getting-Started-EIP1

(click to expand)

Getting-Started-EIP1

b. Set EIP used in: to VPC and click Yes, Allocate.

Note: There is no charge for Elastic IP addresses (EIPs) that are connected to running instances. If you remove the instance (e.g. the EIP is no longer connected to a running instance) then there is a cost of $0.005/hr for the EIP).

Getting-Started-EIP2

(click to expand)

Getting-Started-EIP2

c. Note your new IP address and click Close.

Getting-Started-EIP3

(click to expand)

Getting-Started-EIP3

d. Select the new IP address in the Elastic IP column. Press the Actions button and choose the Associate Address option.

Getting-Started-EIP4

(click to expand)

Getting-Started-EIP4

e. Click in the Instance text box and choose the option that has your instance name.

Note: in the WordPress tutorial we named this machine WordPress.

Getting-Started-EIP5

(click to expand)

Getting-Started-EIP5

f. Make a note of your new IP address in the Elastic IP column.

Getting-Started-EIP6

(click to expand)

Getting-Started-EIP6

g. Verify that your new Elastic IP address is working by typing it into your web browser.

Getting-Started-RT53-DNS-IP-web-check

(click to expand)

Getting-Started-RT53-DNS-IP-web-check

Now that you have an IP address associated with your instance, we will need to configure the Domain Name System (DNS) to point to this address so that people can find your website.

Note: In this example we will be acquiring a new domain name and associating it with the Elastic IP address we just created (which is attached to your instance). If you already have a domain name, or if you choose to use another domain registrar to get a domain name, please refer to their documentation on configuring DNS for your instance.


a. Click here to open the Route 53 console in a new window (Route 53 is AWS’s DNS service). You can register new domain names with Route 53 as well as manage DNS records for your domain.

Select Get Started Now under Domain Registration.

Getting-Started-RT53-1

(click to expand)

Getting-Started-RT53-1

b. Click the Register Domain button. On the next screen, enter the domain you want in the Choose a Domain box (cloudexamples is shown in the image, then select a Top Level Domain (TLD) (e.g. .com, .org, .co.uk, etc.) And click the Check button to see if the domain is available. If the domain is available, click the Add to cart button and scroll to the bottom of the page to click Continue.

Note: Domains are not part of the free tier so you will be charged for any domain you register.

Getting-Started-RT53-3a

(click to expand)

Getting-Started-RT53-3a

c. Enter your Contact Details. These are the details that will be associated with your domain name. When you are done, click Continue at the bottom of the page.

Getting-Started-RT53-4a

(click to expand)

Getting-Started-RT53-4a

d. Review the details as they are listed and, if they are correct, check the box titled I have read and agree to the AWS Domain Name Registration Agreement. Then click the Complete Purchase button.

Getting-Started-RT53-5

(click to expand)

Getting-Started-RT53-5

e. If you registered a domain that has a generic top-level domain (such as .com), you'll receive an email that asks you to confirm your email address. (We don't send an email if we already have confirmation that the email address is valid.)

You must follow the link in this email to confirm your email address, or the domain won't be registered.

For all domains, you'll receive an email when your domain registration has been approved.

Note: it can take a few minutes for the system to confirm the registration of your new domain.

Getting-Started-RT53-10-registered_email

(click to expand)

Getting-Started-RT53-10-registered_email
Getting-Started-RT53-8-email

(click to expand)

Getting-Started-RT53-8-email

Our last step is to configure the DNS so that the new domain we created in step 2 can point to the address we have for our server.  This can be the static IP address (from step 1) or a fully qualified domain name (FQDN) that is automatically created if you are using Amazon Elastic Beanstalk.


a. Open the Hosted Zones part of the Route 53 console by clicking here. Next, click on the domain name you created in step 2 (in this example we are using cloudexamples.com but your domain will be different).

Getting-Started-RT53-DNS1

(click to expand)

Getting-Started-RT53-DNS1

Below are Tabs to help you choose the scenario that is most applicable to you. 

If you have a static IP address for your website, virtual server, or service; select Static IP Address below. 

If you have a Fully Qualified Domain Name (FQDN) for your resourse (this is common for applications launced by Elastic Beanstalk, Lambda functions, S3 static sites and more advanced deployments using Elastic Load Balancing) please select Fully Qualified Domain Name (FQDN) below.

  • Static IP Address

    b. Click the Create Record Set button. On the right side of the window, enter www in the Name text box. Enter the Elastic IP address you created in step 1 in the Value box and then click Create.

    Getting-Started-RT53-DNS3

    (click to expand)

    Getting-Started-RT53-DNS3

    c. Verify that you have a new entry in the main table with the value you entered.

    Getting-Started-RT53-DNS4

    (click to expand)

    Getting-Started-RT53-DNS4
  • Fully Qualified Domain Name (FQDN)


    b. Click the Create Record Set button. On the right side of the window, enter www in the Name text box. Then select Yes for the Alias setting.  An Alias Target box will appear, click in the Alias Target box and you will see a list of resources that you have available.  Select the resource you want to point to (this will be under Elastic Load Balancers and should the the resource associated with your Elastic Beanstalk deployed application), then click Create.

    Getting-Started-RT53-DNS3b

    (click to expand)

    Getting-Started-RT53-DNS3b

    c. Verify that you have a new entry in the main table with the value you entered.

    Getting-Started-RT53-DNS4b

    (click to expand)

    Getting-Started-RT53-DNS4b

d. Verify that you website is now available at your new domain by typing your new website address into your web browser.

Getting-Started-RT53-DNS-web-check

(click to expand)

Getting-Started-RT53-DNS-web-check

Congratulations! Users can now access your website through the web address you selected.  In the next section you'll learn how to set up monitoring and notifications for your instances.

Learn how to set up Amazon CloudWatch to monitor your website »


Yes
No