24.8 Domain Registration and Transfer to Route 53
Alright, let’s get our hands dirty with the part everyone loves: buying and moving internet real estate. Domain registration is the process of claiming a name—like my-absurdly-clever-app.io—so that you, and only you, get to tell the world what it points to. Route 53 is both a registrar and a DNS service, which is fantastically convenient. It means you can manage your domain’s very existence and its intricate traffic routing rules all in one place, without dealing with some other company’s clunky, ad-ridden web portal from 2005.
Now, why would you transfer a domain to Route 53? Control. Pure and simple. Having your domain registered with the same company that handles your DNS (especially DNS as powerful as Route 53’s) cuts out a whole layer of potential “oh, for the love of…” moments. No more waiting for DNS changes to propagate from your registrar’s nameservers to the wider world. You change a record in Route 53, and because it’s also the authoritative source for your domain, the update is immediate from its perspective. It’s like being the chef and the maître d’ instead of having to yell the specials across a busy street.
The Fine Print of Registering a New Domain
So you’ve thought of a name that isn’t taken. Miraculous. Before you smash that “Purchase” button, let’s talk TLDs (Top-Level Domains, like .com, .io, .dev). Not all are created equal. Some, like .io, are notoriously expensive to renew. Others might have weird restrictions. Route 53 supports a ton of them, but it’s always wise to check the price for both the first year and the renewal before you fall in love. The API makes this easy.
# Let's see if my-brilliant-idea.dev is available and what it'll cost
aws route53domains check-domain-availability --domain-name my-brilliant-idea.dev
The output will tell you if it’s available and, crucially, whether it’s AVAILABLE, UNAVAILABLE, or RESERVED. Some domains are reserved for weird trademark reasons, and others are just premium domains that cost a fortune. The response might not show the price; for that, you often need to call list-prices or just look at the final screen in the console before confirming.
Once you register, Route 53 automatically creates a hosted zone for you. This is your DNS configuration’s home base. It’s a thoughtful touch, but remember: this auto-created hosted zone will use a set of randomly assigned nameservers. If you’re transferring a domain in later, you’ll be changing these, so don’t get too attached.
The Intricate Dance of Transferring a Domain
Transferring a domain is like moving houses. You need to pack everything correctly, notify the right people, and you’ll be without service for a brief, terrifying window. The most common pitfall? The bloody domain lock. For security, almost all registrars lock your domain by default to prevent unauthorized transfers. You must go to your current registrar’s admin panel and disable this lock. It’s often called “Transfer Lock” or “Registrar Lock.”
Next, you need the authorization code (also called an EPP code). This is the secret handshake that proves you own the domain and are allowed to move it. Your current registrar is obligated to give this to you, though sometimes you have to dig through their UI to find it or request it via email, because of course you do.
With the code in hand, you initiate the transfer in Route 53.
# Initiate a transfer for my-old-domain.com
aws route53domains transfer-domain --region us-east-1 \
--domain-name my-old-domain.com \
--duration-in-years 1 \
--auth-code "YOUR_SUPER_SECRET_EPP_CODE" \
--admin-contact '{"FirstName": "Jane", "LastName": "Doe", "ContactType": "PERSON", "Email": "jane@my-old-domain.com", "AddressLine1": "123 Main St", "City": "Anytown", "State": "NY", "CountryCode": "US", "ZipCode": "12345", "PhoneNumber": "+1.5555555555"}' \
--tech-contact '...' # Same structure as admin contact
--registrant-contact '...' # Same structure again
Yes, the contact information is painfully verbose in the CLI. The console form is marginally better. And note the --region us-east-1—for some reason known only to Amazon’s internal architecture, the route53domains API only works in the us-east-1 region. It’s a classic AWS quirk. Fail to specify this and you’ll get a confusing error, wasting precious minutes of your life you’ll never get back.
What to Expect and What Can Go Wrong
After you initiate, the real fun begins. An email will be sent to the registrant contact (and sometimes admin contact) listed on the domain’s WHOIS. They must approve the transfer. This email often gets caught in spam filters, or goes to some long-forgotten hostmaster@ email address. If it’s not approved within a few days, the transfer request expires, and you get to start over.
The actual transfer can take anywhere from a few minutes to a week. It’s not AWS’s fault; it’s the glacial pace of the global domain registry system. During this time, your domain might resolve intermittently or not at all. This is why you do transfers during a maintenance window or when you can tolerate a little downtime. Never try to transfer a domain for a live, mission-critical service on a Tuesday afternoon. You have been warned.
Once it’s complete, your domain is now managed by Amazon. Your DNS records, however, are a different story. The hosted zone that was automatically created for the transfer will be empty. You are now responsible for re-creating your A, CNAME, MX (for email!), and TXT records within Route 53. Do not forget your MX records. If you do, your email will stop working, and you will only figure it out hours later when you wonder why your inbox is so suspiciously quiet. Export the zone file from your old provider before you start the transfer. It’s your cheat sheet.
The final step is to point your domain to the new hosted zone. Even though both are in Route 53, they are separate entities. You must go to your registered domain’s details in the Route 53 console and explicitly tell it to use the specific hosted zone you’ve populated with all your precious records. It’s one last “gotcha” to keep you on your toes.