Skip to main content

Day 10: Get your custom domain (real URLs)

ยท 23 min read
Norah Klintberg Sakal
AI Consultant & Developer

Get your custom domain (real URLs)

What you'll learn

How to set up a custom domain with Route 53 and point it to your Application Load Balancer.

No more default URLsโ€‹

Day 9: You built the front-yard house (ALB)

Today: We give it a real address

Here's the situation: Your ALB has a public endpoint:

fargate-alb-1234567890.us-east-1.elb.amazonaws.com

This works, but:
โŒ Impossible to remember
โŒ Looks unprofessional
โŒ Hard to share
โŒ Can't use for SSL certificate (Day 11)

What you want:

ai-caller.yourdomain.com

Clean. Professional. Memorable.

Solution: Route 53 + Custom Domain

Think of it like a street address:

Without custom domain:
"Visit me at building number 1234567890 on Amazon Load Balancer Street in us-east-1"

With custom domain:
"Visit me at ai-caller.yourdomain.com"

Same destination. Much easier to remember.

By the end of today, you'll have:

โœ… Custom domain registered (or using existing one)
โœ… Hosted zone in Route 53
โœ… A record pointing to your ALB
โœ… Clean URL like ai-caller.yourdomain.com

Let's get you a real address ๐ŸŒ

What you'll build todayโ€‹

A complete DNS setup:

ComponentValuePurpose
Domainyourdomain.comYour registered domain
Hosted Zoneyourdomain.comManages DNS records
A Recordai-caller.yourdomain.comPoints to ALB
Alias TargetFargate-ALBYour load balancer

Result:

ai-caller.yourdomain.com โ†’ Fargate-ALB โ†’ Your containers

What you'll learnโ€‹

  • What DNS is (and how it works)
  • How Route 53 manages domains
  • The difference between A records and CNAME records
  • Why Alias records are better than CNAME for ALB
  • How to register a domain (or use an existing one)
  • How to create DNS records
This advent calendar is completely free.

But if you want:

โœ… Complete codebase (one clean repo)
โœ… Complete walkthroughs
โœ… Support when stuck
โœ… Production templates
โœ… Advanced features

Join the waitlist for the full course (launching February 2026):

Building something with AI calling? Let's chat about your use case!
Schedule a free call โ†— - no pitch, just two builders talking.

Time requiredโ€‹

25 minutes (domain registration takes 10-15 mins, DNS setup takes 5-10 min)

Prerequisitesโ€‹

โœ… Completed Day 3 (VPC) โ†—
โœ… Completed Day 4 (Subnets) โ†—
โœ… Completed Day 5 (NAT Gateway) โ†—
โœ… Completed Day 6 (Route Tables) โ†—
โœ… Completed Day 7 (Security Groups) โ†—
โœ… Completed Day 8 (prove it works) โ†—
โœ… Completed Day 9 (Application Load Balancer) โ†—
โœ… Access to AWS Console
โœ… Credit card (for main registration, ~$15/year)

Already have a domain?

If you already own a domain (from GoDaddy, Namecheap etc.), you can:

  • Option 1: Transfer it to Route 53 (recommended, easier to manage)
  • Option 2: Keep it where it is, just point nameservers to Route 53

We'll cover both options below.

Understanding DNS (3-minute primer)โ€‹

What is DNS?โ€‹

DNS = Domain Name System

It translates human-readable names to computer-readable IP addresses.

Example:

google.com โ†’ 142.250.80.46

Why this matters:

  • Humans remember: "google.com"
  • Computers need: "142.250.80.46"
  • DNS is the translator

How DNS worksโ€‹

When you type ai-caller.yourdomain.com in your browser:

All of this happens in milliseconds.

What is Route 53?โ€‹

Route 53 = AWS's DNS service

It does two things:

  1. Domain registration: But domains (like GoDaddy, Namecheap etc.)
  2. DNS management: Create records, manage routing

AWSs DNS service for domain registration and DNS management

AWS's DNS service for domain registration and DNS management

Why use Route 53:

โœ… Integrates with AWS services (ALB, CloudFront, S3)
โœ… Alias records (no charge for queries to AWS resources)
โœ… Health checks and failover
โœ… All in one place with your infrastructure

A records vs CNAME vs Aliasโ€‹

Three ways to point a domain to something:

TypeMapsExampleLimitations
A RecordDomain โ†’ IP addressexample.com โ†’ 54.123.45.67Only works for IPs, ALB IPs can change
CNAMEDomain โ†’ Another domainwww.example.com โ†’ example.comCan't use on root domain (example.com)
Alias (Route 53 only)Domain โ†’ AWS resourceexample.com โ†’ ALBOnly works in Route 53, free queries

For ALB, we use Alias records:

โœ… Works of root domain
โœ… Free (no query charges)
โœ… Automatically updates if ALB IP changes
โœ… AWS-native integration

This is the Route 53 superpower.

Step 1: Decide on your domain approachโ€‹

You have 3 options:

Pricing as of Dec 2025

All prices mentioned below (domains, transfers, hosted zones) reflect AWS Route 53 pricing as of December 2025.
AWS may change pricing, always double-check in the AWS console if this matters for your setup.

  • Cost: ~$15/year (depends on the domain)
  • Time: 10-15 minutes
  • Easiest setup

Option B: Transfer existing domain on Route 53โ€‹

  • Cost ~$15 transfer fee (depends on the domain)
  • Time: 1-7 days for transfer
  • Best for long-term

Option C: Keep domain elsewhere, use Route 53 for DNS onlyโ€‹

  • Cost: $0.50/month for hosted zone (as of Dec 2025)
  • Time: 5 minutes
  • Good if you want to keep your registrar

For this tutorial, we'll do Option A (register a new domain).

If you're doing Option B or C, skip to Step 3.

Step 2: Register a domain with Route 53โ€‹

Open the AWS Console โ†—

In the search bar at the top, type route 53 and click Route 53 from the dropdown menu:

In the search bar at the top, type route 53 and click Route 53 from the dropdown menu

In the search bar at the top, type route 53 and click Route 53 from the dropdown menu

Click to expand the left menu, then click Registered domains in the left menu:

Click to expand the left menu, then click Registered domains in the left menu

Click to expand the left menu, then click Registered domains in the left menu

Click Register domains:

Click Register domains

Click Register domains

Step 2.1: Choose a domain nameโ€‹

Type your desired domain name and click Search:

Type your desired domain name and click Search

Type your desired domain name and click Search

Tips for choosing a domain:

  • Keep it short and Memorable
  • USe .com if available (still most recognizable)
  • .ai, .io, .tech are good for tech projects
  • Avoid hyphens and numbers if possible

If your desired domain is taken:

  • Try different TLDs (.ai, .io, .tech, .dev)
  • Add a prefix/suffix (get,try,app,ai)
  • Use domain name generator tools like Namelix โ†—

Step 2.2: Add to cart and proceedโ€‹

Select your domain:

Select your domain

Select your domain

Click Proceed to checkout:

Click Proceed to checkout

Click Proceed to checkout

Click Next:

Click Next

Click Next

Step 2.3: Enter contact informationโ€‹

Fill in your contact details:

  • Contact type
  • First name, Last name
  • Email address
  • Phone number
  • Address

Fill in your contact details

Fill in your contact details

Privacy protection

Route 53 includes privacy protection for free on most TLDs.

That means:

  • Your personal info is hidden from WHOIS lookups
  • Spammers can't harvest your email/phone
  • AWS's contact info shows instead

Make sure "Privacy protection" is enabled (usually default):

Make sure Privacy protection is enabled (usually default)

Make sure "Privacy protection" is enabled (usually default)

Step 2.4: Review and complete purchaseโ€‹

Review your order:

  • Domain name: โœ…
  • Duration: 1 year (you can auto-renew)
  • Privacy protection: Enabled โœ…
  • Total: ~$15 (varies by TLD)

Review your order

Review your order

Check the box: "I have read and agree to the Amazon Route 53 Domain Name Registration End User Agreement":

Check the box: I have read and agree to the Amazon Route 53 Domain Name Registration End User Agreement

Check the box: "I have read and agree to the Amazon Route 53 Domain Name Registration End User Agreement"

Click Submit to complete the order:

Click Submit to complete the order

Click Submit to complete the order

โœ… You should see: "Your domain registration is being processed":

You should see: Your domain registration is being processed

You should see: "Your domain registration is being processed"

Step 2.5: Wait for domain registrationโ€‹

Domain registration takes 10-15 minutes

You'll receive an email once the domain is registered:

You will receive an email once the domain is registered

You'll receive an email once the domain is registered

You might receive an email to verify your contact info
  1. Check your email
  2. Click the verification link
  3. Verify within 15 days (or domain gets suspended)

Step 3: Create Hosted Zoneโ€‹

Route 53 automatically creates a hosted zone when you register a domain.

Click Hosted zones in the left menu:

Click Hosted zones in the left menu

Click Hosted zones in the left menu

You should see your domain listed (e.g. yourdomain.com):

You should see your domain listed (e.g. yourdomain.com)

You should see your domain listed (e.g. yourdomain.com)

Click on your domain name to open it:

Click on your domain name to open it

Click on your domain name to open it

You'll see 2 default records:

  • NS (Name Server) record: Points to Route 53's name servers
  • SOA (Start of Authority) record: DNS metadata
Don't touch these 2 default records

They're required for DNS to work.

You'll see 2 default records, don't touch these 2 default records: You will see 2 default records, do not touch these 2 default records

You'll see 2 default records, don't touch these 2 default records

If you're using an existing domain from another registrar

You need to point your domain's nameservers to Route 53:

  1. In Route 53: Click the checkbox for NS records and copy the 4 nameservers from your NS record (looks like ns-123.awsdns-12.com):

In Route 53: Click the checkbox for NS records and copy the 4 nameservers from your NS record (looks like ns-123.awsdns-12.com)

In Route 53: Click the checkbox for NS records and copy the 4 nameservers from your NS record (looks like ns-123.awsdns-12.com)

  1. In your registrar (GoDaddy, Namecheap, etc.): Update nameservers to the 4 Route 53 nameservers

  2. Wait 24-48 hours for DNS propagation

After nameserver update, continue with Step 4 below.

Step 4: Create A record for your subdomainโ€‹

Now we'll create an A record that points ai-caller.yourdomain.com to your ALB.

Click Create record:

Click Create record

Click Create record

Step 4.1: Configure the recordโ€‹

Fill in the settings:

FieldValue
Record name (or whatever subdomain you want)
Record typeA - Routes traffic to an IPv4 address
Aliasโœ… Turn ON
Route traffic toAlias to Application and Classic Load Balancer
Regionus-east-1 (or your ALB's region)
Load balancerSelect Fargate-ALB

Fill in the settings, make sure to turn on Alias

Fill in the settings, make sure to turn on Alias

Route traffic to Application and Classic Load Balancer and select Fargate-ALB:

Route traffic to Application and Classic Load Balancer and select Fargate-ALB

Route traffic to Application and Classic Load Balancer and select Fargate-ALB

Seeing "dualstack" in your record?

After you select your ALB, Route 53 will show something like:

dualstack.Fargate-ALB-1318397004.us-east-1.elb.amazonaws.com

This is normal. Route 53 automatically adds the dualstack. prefix to ALB Alias records.

It means your domain can handle both IPv4 and IPv6 traffic. The dualstack version points to the exact same load balancer you see in the EC2 console.

Step 4.2: Create the recordโ€‹

Scroll down and click Create records:

Scroll down and click Create records

Scroll down and click Create records

โœ… You should see: "Successfully created record" and your new A record:

You should see: Successfully created record and your new A record

You should see: "Successfully created record" and your new A record

You should now see 3 records in your hosted zone:

  1. NA (nameservers)
  2. SOA (start of authority)
  3. A record (ai-caller.yourdomain.com โ†’ Fargate-ALB) โ† Your new record!

You should now see 3 records in your hosted zone

You should now see 3 records in your hosted zone

Step 5: Test your custom domainโ€‹

DNS changes take 1-5 minutes to propagate.

Wait a few minutes, then test:

Option 1: Browser testโ€‹

Open your browser and visit:

http://ai-caller.yourdomain.com

Expected result:

503 Service Temporarily Unavailable

Expected result: 503 Service Temporarily Unavailable: Expected result: 503 Service Temporarily Unavailable

Expected result: 503 Service Temporarily Unavailable

This is perfect!

Why 503 is good:
โœ… Domain resolved correctly
โœ… Reached your ALB
โœ… ALB is working
โŒ Just no containers yet (we deploy them on Day 13)

Option 2: DNS lookup testโ€‹

Run this in your terminal:

Your terminal
nslookup ai-caller.yourdomain.com

Expected output:

Your terminal
Server:     8.8.8.8
Address: 8.8.8.8#53

Non-authoritative answer:
Name: ai-caller.yourdomain.com
Address: 54.123.45.67

Expected nslookup output

Expected nslookup output

Why just an IP address in the response?
Deep dive

Because you used an Alias record, Route 53 resolves the ALB's IP identity.

You won't see the ALB domain in the output - just the IP - and that's exactly right.

Option 3: curl testโ€‹

Run this is your terminal:

Your terminal
curl -I http://ai-caller.yourdomain.com

Expected output:

Your terminal
HTTP/1.1 503 Service Temporarily Unavailable

Expected curl output: Expected curl output

Expected curl output

โœ… 503 from your ALB = DNS is working!

Step 6: Verify in AWS Consoleโ€‹

Let's confirm everything in the console.

In the search bar at the top, type ec2 and click EC2 from the dropdown menu:

In the search bar at the top, type ec2 and click EC2 from the dropdown menu

In the search bar at the top, type ec2 and click EC2 from the dropdown menu

In the left menu, scroll down and click Load Balancers:

In the left menu, scroll down and click Load Balancers

In the left menu, scroll down and click Load Balancers

Select Fargate-ALB:

Select Fargate-ALB

Select Fargate-ALB

Confirm:

  • Status is Active
  • DNS name shows: Fargate-ALB-xxxx.us-east-1.elb.amazonaws.com

This is the ALB that your custom domain (ai-caller.yourdomain.com) now points to.

Don't see your custom domain here?

That's expected! The EC2 console only shows the ALB's own DNS name, not custom domains pointing to it. Your nslookup test in Step 5 already confirmed the connection works.

Today's winโ€‹

If you completed all steps:
โœ… Registered custom domain (or configured existing one)
โœ… Created hosted zone in Route 53
โœ… Created A record pointing to ALB
โœ… Tested DNS resolution
โœ… Verified custom domain works

You now have a real, professional URL.

Before:

fargate-alb-1234567890.us-east-1.elb.amazonaws.com

After:

ai-caller.yourdomain.com

Tomorrow, we'll add HTTPS (SSL certificate) to make it secure.

Understanding what you builtโ€‹

The DNS resolution flow:

Why Alias records are amazing:
โœ… No charge for DNS queries to ALB
โœ… Automatically updates if ALB's IP changes
โœ… Works on root domains (ai-caller.yourdomain.com)
โœ… Health checks built-in

This is AWS-native DNS magic.

AWSs DNS service for domain registration and DNS management

AWS's DNS service for domain registration and DNS management

Route 53 costsโ€‹

Hosted zone:

  • $0.50 per hosted zone per month
  • First 25 hosted zones (if you use AWS)

Domain registration (as of Dec 2025):

  • Varies by TLD
  • .com: ~$15/year

DNS queries:

  • $0.40 per million queries for standard queries
  • Alias queries to AWS resources: FREE โœ…

For this tutorial:

  • Domain ~$15/year
  • Hosted zone: ~$0.50/month (~$6/year)
  • Alias queries: $0 (free)
  • Total: ~$21/year

Common mistakes (and how to avoid them)โ€‹

โŒ Mistake #1: Forgetting to verify emailโ€‹

Result: Domain gets suspended
Fix: Check your email, click verification link if you receive a verification email from AWS

โŒ Mistake #2: Using CNAME instead of Aliasโ€‹

Result: Charges for DNS queries, con't use root domain
Fix: Always use Alias for AWS resources (ALB, CloudFront, S3)

โŒ Mistake #3: Wrong ALB regionโ€‹

Result: DNS doesn't resolve, "No targets found" error
Fix: Make sure you select the region where your ALB lived (us-east-1)

โŒ Mistake #4: Expecting HTTPS to workโ€‹

Result: Browser shows "Not secure"
Fix: HTTPS requires SSL certification (we add that tomorrow on Day 11)

HTTPS requires SSL certification (we add that tomorrow on Day 11)

HTTPS requires SSL certification (we add that tomorrow on Day 11)

Troubleshootingโ€‹

Domain doesn't resolve (nslookup fails)

Possible causes:

  1. DNS not propagated yet

    • Wait 5-10 minutes
    • Try nslookup ai-caller.yourdomain.com 8.8.8.8 (use Google DNS)
  2. A record not created correctly

    • Go to Route 53 โ†’ Hosted zones โ†’ Your domain
    • Verify A record exists and points to ALB
  3. Nameservers not updated (if using external registrar)

    • Check nameservers match Route 53's NS record
    • DNS propagation can take 24-48 hours
  4. Typo in subdomain name

    • Double-check spelling: ai-caller vs aicaller
Getting "Server not found" error

Check:

  1. Domain registration completed (check email for confirmation)
  2. Hosted zone exists in Route 53
  3. A record points to correct ALB
  4. ALB is in "Active" state (not "Provisioning")

Most common: DNS not propagated yet. Wait 5-10 minutes.

Can access ALB directly but not via custom domain

This means DNS isn't resolving correctly.

Test:

# This works:
curl http://fargate-alb-xxx.elb.amazonaws.com

# This doesn't:
curl http://ai-caller.yourdomain.com

Fix:

  1. Verify A record exists in Route 53
  2. Check if Alias toggle is ON
  3. Verify ALB is selected correctly
  4. Wait for DNS propagation (5-10 min)
Domain registration stuck in "pending"

Domain registration can take up to 15 minutes.

If it's been longer:

  1. Check email for verification link (click it!)
  2. Check AWS support tickets (sometimes manual review needed)
  3. Try a different domain/TLD
  4. Contact AWS support

Tomorrow's previewโ€‹

Today: You got a custom domain

Tomorrow (Day 11): We add HTTPS (SSL certificate)

What we'll do:

Right now, you site uses HTTP:

http://ai-caller.yourdomain.com โ† NOT SECURE

Tomorrow we'll:

  1. Request an SSL certificate from AWS Certificate Manager (ACM)
  2. Validate domain ownership
  3. Attach certificate to ALB
  4. Add HTTPS listener (port 443)
  5. Redirect HTTP โ†’ HTTPS

After Day 11:

https://ai-caller.yourdomain.com โ† SECURE! ๐Ÿ”’

Why this matters:
โœ… Browser shows "Secure" badge
โœ… Data encrypted in transit
โœ… Required for production apps
โœ… Better SEO rankings
โœ… Users trust it more

HTTPS is non-negotiable for production.
Tomorrow we make it happen!

What we learned todayโ€‹

1. What DNS isโ€‹

The system that translates domain names to IP addresses

2. How Route 53 worksโ€‹

AWS's DNS service for domain registration and DNS management

AWSs DNS service for domain registration and DNS management

AWS's DNS service for domain registration and DNS management

3. A records vs Alias recordsโ€‹

Alias records are AWS-native, free for queries to AWS resources

4. Domain registration processโ€‹

Register and wait for propagation (verify email if prompted)

5. DNS propagationโ€‹

Changes take 1-5 minutes (sometimes up to 48 hours for nameserver changes)

The application layer growsโ€‹

Days 1-2: Local development (your laptop) โœ…
Day 3: VPC (your territory) โœ…
Day 4: Subnets (front yards vs back yards) โœ…
Day 5: NAT Gateway (back gate) โœ…
Day 6: Route Tables (the roads) โœ…
Day 7: Security Groups (the bouncers) โœ…
Day 8: Test Your Network (validation) โœ…
Day 9: Application Load Balancer (front door) โœ…
Day 10: Custom Domain (real URLs) โ† YOU ARE HERE โœ…
Day 11: SSL Certificate (HTTPS)
Day 12: Deploy Frontend
Days 13-17: Fargate Deployment
Days 18-24: Features & Polish

10 days done! 14 to go! ๐Ÿš€

Share your progressโ€‹

Custom domain working? Share it!

Twitter/X:

"Day 10: Got my custom domain! Replaced the default AWS URL with ai-caller.mydomain.com. Route 53 setup was easier than expected. Following @norahsakal's advent calendar ๐ŸŽ„"

LinkedIn:

"Day 10 of building AI calling agents: Set up a custom domain with Route 53. My ALB now has a clean, professional URL instead of the long AWS endpoint. DNS is working, next step is HTTPS!"

Tag me! I want to celebrate your progress! ๐ŸŽ‰

This advent calendar is completely free.

But if you want:

โœ… Complete codebase (one clean repo)
โœ… Complete walkthroughs
โœ… Support when stuck
โœ… Production templates
โœ… Advanced features

Join the waitlist for the full course (launching February 2026):

Building something with AI calling?

Let's chat about your use case!
Schedule a free call โ†— - no pitch, just two builders talking.

Tomorrow: Day 11 โ†’ Add HTTPS (SSL Certification) ๐Ÿ”’

See you then!

โ€” Norah