Sub topic 2
Registering a domain, or using one registered elsewhere
This chapter assumes you know what a hosted zone is from the previous chapter, have an AWS account with permission to use Route 53, and can run the AWS CLI. It covers how to get a domain name under your control. Pointing the domain at Route 53 name servers is covered in the next chapter.
Registrar and DNS service are separate jobs
A domain name involves two services that people often confuse:
- A registrar is the company that records you as the owner of the name with the registry for its top-level domain (TLD), such as .com. It also stores which name servers the domain uses.
- A DNS service hosts the zone, which holds the records that answer queries.
Route 53 does both, but you can use either one alone. You can register in Route 53 and host DNS elsewhere. You can also register at another registrar and host DNS in Route 53. The second case is the most common.
Registering a new domain
In the console, open Route 53, choose Registered domains, and search for a name. Route 53 shows which TLDs are available and their yearly price, which depends on the TLD. Not every TLD is supported.
You can check availability from the CLI. The Route 53 Domains API is served only from us-east-1, so pass that region whatever your other resources use.
aws route53domains check-domain-availability \
--region us-east-1 \
--domain-name example.comThe answer is AVAILABLE, UNAVAILABLE, or another status such as DONT_KNOW. Treat anything other than AVAILABLE as not registrable.
When you complete a registration, you provide registrant contact details. Route 53 then does the following:
- Registers the name, usually for one year with auto-renew on by default.
- Creates a public hosted zone with the same name.
- Sets the domain's name servers to the four servers of that zone.
Because of the last two steps, a domain registered in Route 53 works as soon as the registration completes. No manual delegation is needed. Registration is asynchronous. You can follow it with aws route53domains list-operations --region us-east-1.
Using a domain registered elsewhere
You have two options.
Keep the registrar, use Route 53 for DNS
This is the lowest-risk option because ownership does not move.
- Create a public hosted zone for the domain in Route 53.
- Copy the four name servers from the zone's NS record.
- At your registrar, replace the domain's name servers with those four.
Until step 3 is done, Route 53 holds a zone that no resolver will ask. The next chapter covers that step and how to verify it.
Transfer the registration to Route 53
Transferring moves the registrar role, which gives you one place to manage billing and renewals. Typical requirements:
- The TLD must be supported by Route 53.
- The domain must be unlocked at the current registrar.
- You need an authorization code from that registrar.
- The domain usually must be older than 60 days and not recently transferred.
A transfer adds one year to the registration and is charged like a one-year renewal. Create and fill the hosted zone before you start. If the old registrar's name servers are replaced during the transfer, a zone that is missing records causes an outage.
Common errors
- Zone exists, domain does not resolve. The registrar still lists its old name servers. Delegation was never changed.
- Domain suspended after registering. The registrant email was never verified.
- Transfer rejected. The domain was still locked, the code was wrong, or the 60-day limit applied.
- Duplicate hosted zones. Creating a second zone for the same name gives it a different set of name servers. Only the zone whose name servers the registrar lists is live.
Exercise
You registered example.org at another registrar and created a public hosted zone for it in Route 53. Queries for www.example.org still return the old provider's address. What is the most likely cause, and which setting do you change?
Show answer
The domain's name servers at the registrar still point to the old DNS provider, so resolvers never reach the Route 53 zone. Replace them with the four name servers from the hosted zone's NS record, in the registrar's name server settings. You do not need to transfer the registration.