

# Getting started with Amazon Route 53
<a name="getting-started"></a>

Get started with the basic steps by registering a domain with Amazon Route 53 and configuring Route 53 to respond to DNS queries that resolve to a static website. The first tutorial hosts a static website in an open Amazon S3 bucket, and the second tutorial uses Amazon CloudFront distribution to serve the website with SSL/TLS.

**Estimated cost**
+ There's an annual fee to register a domain, ranging from \$19 to several hundred dollars, depending on the top-level domain, such as .com. For more information, see [Route 53 Pricing for Domain Registration](https://d32ze2gidvkk54.cloudfront.net/Amazon_Route_53_Domain_Registration_Pricing_20140731.pdf). 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 Route 53 to route traffic for your domain.
+ During this tutorial, you create an Amazon S3 bucket and upload a sample web page. If you're a new AWS customer, you can get started with Amazon S3 for free. If you're an existing AWS customer, charges are based on how much data you store, on the number of requests for your data, and on the amount of data transferred. For more information, see [Amazon S3 Pricing](https://aws.amazon.com/s3/pricing/).
+ CloudFront charges are based on the number of requests for your data, the number of edge locations you use, and on the amount of data transferred. For more information, see [CloudFront Pricing](https://aws.amazon.com/cloudfront/pricing/).

**Topics**
+ [Set up](setting-up-route-53.md)
+ [Route DNS traffic to an Amazon S3 static website](getting-started-s3.md)
+ [Route DNS traffic to a CloudFront distribution](getting-started-cloudfront-overview.md)

# Set up Amazon Route 53
<a name="setting-up-route-53"></a>

The overview and procedures in this section help you get started with AWS.

**Topics**
+ [Sign up for an AWS account](#sign-up-for-aws)
+ [Create a user with administrative access](#create-an-admin)
+ [Download tools](#setting-up-sdk)

## Sign up for an AWS account
<a name="sign-up-for-aws"></a>

If you do not have an AWS account, complete the following steps to create one.

**To sign up for an AWS account**

1. Open [https://portal.aws.amazon.com/billing/signup](https://portal.aws.amazon.com/billing/signup).

1. Follow the online instructions.

   Part of the sign-up procedure involves receiving a phone call or text message and entering a verification code on the phone keypad.

   When you sign up for an AWS account, an *AWS account root user* is created. The root user has access to all AWS services and resources in the account. As a security best practice, assign administrative access to a user, and use only the root user to perform [tasks that require root user access](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_root-user.html#root-user-tasks).

AWS sends you a confirmation email after the sign-up process is complete. At any time, you can view your current account activity and manage your account by going to [https://aws.amazon.com/](https://aws.amazon.com/) and choosing **My Account**.

## Create a user with administrative access
<a name="create-an-admin"></a>

After you sign up for an AWS account, secure your AWS account root user, enable AWS IAM Identity Center, and create an administrative user so that you don't use the root user for everyday tasks.

**Secure your AWS account root user**

1.  Sign in to the [AWS Management Console](https://console.aws.amazon.com/) as the account owner by choosing **Root user** and entering your AWS account email address. On the next page, enter your password.

   For help signing in by using root user, see [Signing in as the root user](https://docs.aws.amazon.com/signin/latest/userguide/console-sign-in-tutorials.html#introduction-to-root-user-sign-in-tutorial) in the *AWS Sign-In User Guide*.

1. Turn on multi-factor authentication (MFA) for your root user.

   For instructions, see [Enable a virtual MFA device for your AWS account root user (console)](https://docs.aws.amazon.com/IAM/latest/UserGuide/enable-virt-mfa-for-root.html) in the *IAM User Guide*.

**Create a user with administrative access**

1. Enable IAM Identity Center.

   For instructions, see [Enabling AWS IAM Identity Center](https://docs.aws.amazon.com//singlesignon/latest/userguide/get-set-up-for-idc.html) in the *AWS IAM Identity Center User Guide*.

1. In IAM Identity Center, grant administrative access to a user.

   For a tutorial about using the IAM Identity Center directory as your identity source, see [ Configure user access with the default IAM Identity Center directory](https://docs.aws.amazon.com//singlesignon/latest/userguide/quick-start-default-idc.html) in the *AWS IAM Identity Center User Guide*.

**Sign in as the user with administrative access**
+ To sign in with your IAM Identity Center user, use the sign-in URL that was sent to your email address when you created the IAM Identity Center user.

  For help signing in using an IAM Identity Center user, see [Signing in to the AWS access portal](https://docs.aws.amazon.com/signin/latest/userguide/iam-id-center-sign-in-tutorial.html) in the *AWS Sign-In User Guide*.

**Assign access to additional users**

1. In IAM Identity Center, create a permission set that follows the best practice of applying least-privilege permissions.

   For instructions, see [ Create a permission set](https://docs.aws.amazon.com//singlesignon/latest/userguide/get-started-create-a-permission-set.html) in the *AWS IAM Identity Center User Guide*.

1. Assign users to a group, and then assign single sign-on access to the group.

   For instructions, see [ Add groups](https://docs.aws.amazon.com//singlesignon/latest/userguide/addgroups.html) in the *AWS IAM Identity Center User Guide*.

## Download tools
<a name="setting-up-sdk"></a>

The AWS Management Console includes a console for Amazon Route 53, but if you want to access the services programmatically, see the following:
+ The API guide document the operations that the services support and provide links to the related SDK and CLI documentation:
  + [Amazon Route 53 API Reference](https://docs.aws.amazon.com/Route53/latest/APIReference/Welcome.html)
+ To call an API without having to handle low-level details like assembling raw HTTP requests, you can use an AWS SDK. The AWS SDKs provide functions and data types that encapsulate the functionality of AWS services. To download an AWS SDK and access installation instructions, see the applicable page: 
  + [Java](https://aws.amazon.com/sdk-for-java/)
  + [JavaScript](http://aws.amazon.com/sdkforbrowser/)
  + [.NET](https://aws.amazon.com/sdk-for-net/)
  + [Node.js](https://aws.amazon.com/sdk-for-node-js/)
  + [PHP](https://aws.amazon.com/sdk-for-php/)
  + [Python](https://github.com/boto/boto)
  + [Ruby](https://aws.amazon.com/sdk-for-ruby/)

  For a complete list of AWS SDKs, see [Tools for Amazon Web Services](http://aws.amazon.com/tools/).
+ You can use the AWS Command Line Interface (AWS CLI) to control multiple AWS services from the command line. You can also automate your commands using scripts. For more information, see [AWS Command Line Interface](https://aws.amazon.com/cli/).
+ AWS Tools for Windows PowerShell supports these AWS services. For more information, see [AWS Tools for PowerShell Cmdlet Reference](http://aws.amazon.com/documentation/powershell/).

# Use your domain for a static website in an Amazon S3 bucket
<a name="getting-started-s3"></a>

This tutorial shows you how to use Amazon Route 53 to route DNS traffic for your domain to an Amazon Simple Storage Service bucket that hosts a static website. You'll create alias records that point your domain to the S3 website endpoint.

This tutorial is part of a complete static website setup workflow. For general information about routing traffic to any S3 bucket, see [Routing traffic to a website that is hosted in an Amazon S3 bucket](RoutingToS3Bucket.md).

When you're finished, visitors can access your static website using your custom domain name.

**Note**  
You can also transfer an existing domain to Route 53, but the process is more complex and time-consuming than registering a new domain. For more information, see [Transferring registration for a domain to Amazon Route 53](domain-transfer-to-route-53.md). 

## Prerequisites
<a name="getting-started-prerequisites"></a>

Before you begin, complete these steps:
+ Complete the steps in [Set up Amazon Route 53](setting-up-route-53.md).
+ Register a domain name using Amazon Route 53. For more information, see [Registering a new domain](domain-register.md).
+ Configure an Amazon Simple Storage Service bucket for static website hosting. For complete instructions, see [Tutorial: Configuring a static website using a custom domain registered with Route 53](https://docs.aws.amazon.com/AmazonS3/latest/userguide/website-hosting-custom-domain-walkthrough.html) in the *Amazon Simple Storage Service User Guide*.

When you complete the Amazon Simple Storage Service tutorial, you'll have:
+ Amazon S3 buckets configured for website hosting and redirect (if using www subdomain)
+ Website content uploaded to your bucket
+ Public access configured for your website bucket

## Step 1: Route DNS traffic for your domain to your website bucket
<a name="getting-started-create-alias"></a>

Now that you have an Amazon Simple Storage Service bucket configured for static website hosting, use Amazon Route 53 to route DNS traffic for your domain to the bucket. This enables visitors to access your website using your custom domain name.<a name="getting-started-create-alias-procedure"></a>

**To route traffic to your website**

1. Open the Route 53 console at [https://console.aws.amazon.com/route53/](https://console.aws.amazon.com/route53/).

1. In the navigation pane, choose **Hosted zones**.
**Note**  
When you registered your domain, Amazon Route 53 automatically created a hosted zone with the same name. A hosted zone contains information about how you want Route 53 to route traffic for the domain.

1. In the list of hosted zones, choose the name of your domain. 

1. Choose **Create record**.

1. Specify the following values:  
**Record name**  
Leave blank to create a record for your root domain.  
**Record type**  
Choose **A ‐ Routes traffic to an IPv4 address and some AWS resources**.  
**Alias**  
Turn on **Alias**.  
**Route traffic to**  
Choose **Alias to S3 website endpoint**.  
Choose the Region where you created your S3 bucket.  
Choose your S3 bucket. The bucket name should match the name of your domain. In the list, the bucket name appears with the Amazon S3 website endpoint for the Region where the bucket was created, for example, `s3-website-us-west-1.amazonaws.com (example.com)`.  
If your bucket does not appear in the list, enter the Amazon S3 website endpoint for the Region where the bucket was created, for example, **s3-website-us-west-2.amazonaws.com**. For a complete list of Amazon S3 website endpoints, see [Amazon S3 Website endpoints](https://docs.aws.amazon.com/general/latest/gr/s3.html#s3_website_region_endpoints).  
**Evaluate target health**  
Accept the default value of **No**.

1. Choose **Create records**.

**(Optional) To add an alias record for your subdomain (`www.example.com`)**

If you created a bucket for your subdomain, add an alias record for it also.

1. Choose **Create record**.

1. Specify the following values:  
**Record name**  
Enter **www**.  
**Record type**  
Choose **A ‐ Routes traffic to an IPv4 address and some AWS resources**.  
**Alias**  
Turn on **Alias**.  
**Route traffic to**  
Choose **Alias to S3 website endpoint**.  
Choose the Region where you created your S3 bucket.  
Choose your S3 bucket for the subdomain, for example, `s3-website-us-west-2.amazonaws.com (www.example.com)`.  
**Evaluate target health**  
Accept the default value of **No**.

1. Choose **Create records**.

## Step 2: Test your website
<a name="getting-started-test"></a>

To verify that the website is working correctly, open a web browser and browse to the following URLs:
+ http://*your-domain-name*, for example, `example.com` – Displays the index document in the *your-domain-name* bucket
+ http://www.*your-domain-name* for example, `www.example.com` – Redirects your request to the *your-domain-name* bucket

In some cases, you might need to clear the cache to see the expected behavior.

For more advanced information about routing your internet traffic, see [Configuring Amazon Route 53 as your DNS service](dns-configuring.md). For information about routing your internet traffic to AWS resources, see [Routing internet traffic to your AWS resources](routing-to-aws-resources.md).

**Note**  
Amazon S3 does not support HTTPS access to the website. If you want to use HTTPS, you can use Amazon CloudFront to serve a static website hosted on Amazon S3. For more information, see [Use an Amazon CloudFront distribution to serve a static website](getting-started-cloudfront-overview.md).

# Use an Amazon CloudFront distribution to serve a static website
<a name="getting-started-cloudfront-overview"></a>

This tutorial shows you how to use Amazon Route 53 to route DNS traffic for your domain to Amazon CloudFront distributions that serve a static website. You'll create alias records that point your domain and subdomain to CloudFront distributions.

This tutorial is part of a complete static website setup workflow. For general information about routing traffic to any CloudFront distribution, see [Routing traffic to an Amazon CloudFront distribution by using your domain name](routing-to-cloudfront-distribution.md).

When you're finished, visitors can access your website using your custom domain name with HTTPS security provided by CloudFront.

## Prerequisites
<a name="getting-started-prerequisites-cloudfront"></a>

Before you begin, complete these steps:
+ Complete the steps in [Set up Amazon Route 53](setting-up-route-53.md).
+ Register a domain name using Amazon Route 53. For more information, see [Registering a new domain](domain-register.md).
+ Create a secure static website using Amazon CloudFront and Amazon Simple Storage Service. For complete instructions, see [Get started with a secure static website](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/getting-started-secure-static-website-cloudformation-template.html) in the *Amazon CloudFront Developer Guide*.

When you complete the Amazon CloudFront tutorial, you'll have:
+ An SSL/TLS certificate for your domain in AWS Certificate Manager
+ Amazon S3 buckets configured for website hosting and redirect
+ CloudFront distributions for both your root domain and subdomain

## Step 1: Route DNS traffic for your domain to your CloudFront distribution
<a name="getting-started-cloudfront-create-alias"></a>

Now that you have Amazon CloudFront distributions for your website, use Amazon Route 53 to route DNS traffic for your domain to the distributions. This enables visitors to access your website using your custom domain name.

For more information about routing traffic to CloudFront distributions, see [Routing traffic to an Amazon CloudFront distribution by using your domain name](routing-to-cloudfront-distribution.md).<a name="getting-started-cloudfront-create-alias-procedure"></a>

**To route traffic to your website**

1. Open the Route 53 console at [https://console.aws.amazon.com/route53/](https://console.aws.amazon.com/route53/).

1. In the navigation pane, choose **Hosted zones**.
**Note**  
When you registered your domain, Amazon Route 53 automatically created a hosted zone with the same name. A hosted zone contains information about how you want Route 53 to route traffic for the domain.

1. In the list of hosted zones, choose the name of your domain. 

1. Choose **Create record**.

1. Specify the following values:  
**Record name**  
For your subdomain record, enter **www**.  
**Record type**  
Choose **A ‐ Routes traffic to an IPv4 address and some AWS resources**.  
**Alias**  
Turn on **Alias**.  
**Route traffic to**  
Choose **Alias to CloudFront distribution**.  
Choose the us-east-1 Region.  
Choose your CloudFront distribution. The distribution name should match the name that appears in the **Domain name** column in the CloudFront console, for example, `dddjjjkkk.cloudfront.net`.  
**Evaluate target health**  
Accept the default value of **No**.

1. Choose **Create records**.

**To add an alias record for your root domain (`example.com`)**

Add an alias record for your root domain also, so it points to the CloudFront distribution that redirects traffic to `www.example.com`.

1. Choose **Create record**.

1. Specify the following values:  
**Record name**  
Leave blank to create a record for your root domain.  
**Record type**  
Choose **A ‐ Routes traffic to an IPv4 address and some AWS resources**.  
**Alias**  
Turn on **Alias**.  
**Route traffic to**  
Choose **Alias to CloudFront distribution**.  
Choose the us-east-1 Region.  
Choose your root domain CloudFront distribution.  
**Evaluate target health**  
Accept the default value of **No**.

1. Choose **Create records**.

### Step 2: Test your website
<a name="getting-started-cloudfront-test"></a>

To verify that the website is working correctly, open a web browser and browse to the following URLs:
+ https://www.*your-domain-name*, for example, `www.example.com` – Displays the index document in the *www.your-domain-name* bucket
+ https://*your-domain-name* for example, `example.com` – Redirects your request to the *www.your-domain-name* bucket

In some cases, you might need to clear the cache to see the expected behavior.

For more advanced information about routing your internet traffic, see [Configuring Amazon Route 53 as your DNS service](dns-configuring.md). For information about routing your internet traffic to AWS resources, see [Routing internet traffic to your AWS resources](routing-to-aws-resources.md).