DEV Community

Aisalkyn Aidarova
Aisalkyn Aidarova

Posted on

Lab – Route 53 + Custom Domain + HTTPS (AWS Certificate Manager)

Lab Goal

So far, your application is running on Amazon ECS behind an Application Load Balancer.

Right now your application URL probably looks like this:

http://restaurant-alb-123456789.us-east-1.elb.amazonaws.com
Enter fullscreen mode Exit fullscreen mode

This URL works, but it doesn't look professional.

Real companies use custom domains such as:

By the end of this lab you will:

  • Connect your domain to your ALB.
  • Learn how DNS works.
  • Create a Route 53 Hosted Zone.
  • Point your domain to your ALB.
  • Secure your website with HTTPS.
  • Request a free SSL certificate using AWS Certificate Manager (ACM).
  • Redirect HTTP traffic to HTTPS.

Production Architecture

Before this lab

Users

↓

ALB DNS Name

↓

Application Load Balancer

↓

Amazon ECS

↓

Containers
Enter fullscreen mode Exit fullscreen mode

After this lab

Users

↓

www.myrestaurant.com

↓

Route 53

↓

Application Load Balancer (HTTPS)

↓

Amazon ECS

↓

Containers
Enter fullscreen mode Exit fullscreen mode

Why Do Companies Use Route 53?

Imagine opening Amazon.

You type

www.amazon.com
Enter fullscreen mode Exit fullscreen mode

You never type

amazon-alb-8723467.us-east-1.elb.amazonaws.com
Enter fullscreen mode Exit fullscreen mode

That long address belongs to AWS.

Customers don't want to remember long AWS addresses.

Instead,

companies buy a domain.

Route 53 tells the Internet:

"When someone types this domain, send them to my Load Balancer."


What is DNS?

DNS stands for

Domain Name System

Think of DNS as the Internet's phone book.

People remember

www.google.com
Enter fullscreen mode Exit fullscreen mode

Computers understand

142.250.72.206
Enter fullscreen mode Exit fullscreen mode

DNS translates names into addresses.

Without DNS,

people would need to remember IP addresses.


What is Route 53?

Amazon Route 53 is AWS's DNS service.

It allows you to:

  • Register domains
  • Manage DNS records
  • Connect domains to AWS services
  • Route users to your application

Part 1 – Buy a Domain

If you already own a domain,

you can use it.

Examples:

myrestaurant.com

jumptotech.com

studentproject.net
Enter fullscreen mode Exit fullscreen mode

If you do not own one,

purchase one from:

  • Route 53
  • Namecheap
  • GoDaddy
  • Squarespace Domains

For this lab we assume you already have one.


Part 2 – Create a Hosted Zone

Open

AWS Console

Search

Route 53
Enter fullscreen mode Exit fullscreen mode

Click

Hosted Zones
Enter fullscreen mode Exit fullscreen mode

Click

Create Hosted Zone
Enter fullscreen mode Exit fullscreen mode

Fill in

Domain Name

myrestaurant.com
Enter fullscreen mode Exit fullscreen mode

Type

Public Hosted Zone
Enter fullscreen mode Exit fullscreen mode

Click

Create Hosted Zone
Enter fullscreen mode Exit fullscreen mode

Why Public Hosted Zone?

A Public Hosted Zone allows anyone on the Internet to reach your website.

Private Hosted Zones are used only inside AWS VPCs.

For websites,

always choose

Public Hosted Zone
Enter fullscreen mode Exit fullscreen mode

Part 3 – Understand the Records

AWS automatically creates:

NS

SOA
Enter fullscreen mode Exit fullscreen mode

Do not delete them.

These records are required for DNS to work.


Part 4 – Create an Alias Record

Click

Create Record
Enter fullscreen mode Exit fullscreen mode

Choose

Record Type

A
Enter fullscreen mode Exit fullscreen mode

Turn ON

Alias
Enter fullscreen mode Exit fullscreen mode

Alias Target

Choose

Application Load Balancer
Enter fullscreen mode Exit fullscreen mode

Select your ALB.

Example

restaurant-alb
Enter fullscreen mode Exit fullscreen mode

Click

Create Record
Enter fullscreen mode Exit fullscreen mode

Done.

Now

myrestaurant.com
Enter fullscreen mode Exit fullscreen mode

points to your Load Balancer.


Why Do We Use an Alias Record?

Normally,

an A record points to an IP address.

Example

192.168.1.20
Enter fullscreen mode Exit fullscreen mode

But an AWS Load Balancer does not have one fixed IP address.

Its IP addresses can change.

Instead,

AWS provides an Alias Record.

The Alias automatically follows your Load Balancer even if its IP addresses change.

This is why AWS recommends using Alias records with ALBs.


Part 5 – Test the Website

Wait a few minutes.

Open your browser.

Visit

http://myrestaurant.com
Enter fullscreen mode Exit fullscreen mode

Your website should load.

If it does,

Route 53 is working correctly.


Why is the Website Still Not Secure?

Look at your browser.

You will probably see

Not Secure
Enter fullscreen mode Exit fullscreen mode

Why?

Because your website is still using

HTTP
Enter fullscreen mode Exit fullscreen mode

instead of

HTTPS
Enter fullscreen mode Exit fullscreen mode

What is HTTPS?

HTTP sends information without encryption.

Anyone between the user and your website could potentially read the traffic.

HTTPS encrypts all communication.

Examples:

  • Login information
  • Credit card numbers
  • Passwords
  • Personal information

Modern websites always use HTTPS.


What is AWS Certificate Manager (ACM)?

AWS Certificate Manager creates SSL certificates.

Certificates prove that your website really belongs to you.

Good news:

AWS ACM public certificates are free to use with supported AWS services like an ALB.


Part 6 – Request a Certificate

Open

AWS Console

Search

Certificate Manager
Enter fullscreen mode Exit fullscreen mode

Click

Request Certificate
Enter fullscreen mode Exit fullscreen mode

Choose

Request a Public Certificate
Enter fullscreen mode Exit fullscreen mode

Click

Next
Enter fullscreen mode Exit fullscreen mode

Domain Name

Example

myrestaurant.com
Enter fullscreen mode Exit fullscreen mode

Also add

www.myrestaurant.com
Enter fullscreen mode Exit fullscreen mode

Click

Next
Enter fullscreen mode Exit fullscreen mode

Validation Method

Choose

DNS Validation
Enter fullscreen mode Exit fullscreen mode

Click

Request
Enter fullscreen mode Exit fullscreen mode

Why DNS Validation?

AWS must verify that you own the domain.

Instead of sending an email,

AWS asks you to create a DNS record.

This is easier and renews automatically while the DNS validation record remains in place.


Part 7 – Validate the Certificate

Open the certificate.

Click

Create Records in Route 53
Enter fullscreen mode Exit fullscreen mode

AWS automatically creates the required DNS validation record.

Wait a few minutes.

Certificate status changes from

Pending Validation
Enter fullscreen mode Exit fullscreen mode

to

Issued
Enter fullscreen mode Exit fullscreen mode

Only after the status becomes Issued can the certificate be attached to your Load Balancer.


Part 8 – Add HTTPS to the ALB

Open

EC2

↓

Load Balancers
Enter fullscreen mode Exit fullscreen mode

Select your ALB.

Open

Listeners and Rules
Enter fullscreen mode Exit fullscreen mode

Click

Add Listener
Enter fullscreen mode Exit fullscreen mode

Choose

HTTPS
Enter fullscreen mode Exit fullscreen mode

Port

443
Enter fullscreen mode Exit fullscreen mode

Certificate

Select

myrestaurant.com
Enter fullscreen mode Exit fullscreen mode

Default Action

Forward to your existing Target Group.

Click

Create
Enter fullscreen mode Exit fullscreen mode

Done.

Your website now supports HTTPS.


Why Port 443?

Port

80
Enter fullscreen mode Exit fullscreen mode

is used for HTTP.

Port

443
Enter fullscreen mode Exit fullscreen mode

is used for HTTPS.

Most websites today use HTTPS on port 443.


Part 9 – Redirect HTTP to HTTPS

Many users will still type

http://myrestaurant.com
Enter fullscreen mode Exit fullscreen mode

We want AWS to automatically redirect them.

Select

HTTP Listener

Port 80
Enter fullscreen mode Exit fullscreen mode

Click

Edit Rules
Enter fullscreen mode Exit fullscreen mode

Default Action

Choose

Redirect
Enter fullscreen mode Exit fullscreen mode

Configure:

Protocol

HTTPS
Enter fullscreen mode Exit fullscreen mode

Port

443
Enter fullscreen mode Exit fullscreen mode

Status Code

HTTP 301
Enter fullscreen mode Exit fullscreen mode

Save.

Now every HTTP request automatically becomes HTTPS.


What is HTTP 301?

301 means

Permanent Redirect

Browsers remember this redirect.

Users automatically use HTTPS in future visits.


Verify Everything Works

Open

https://myrestaurant.com
Enter fullscreen mode Exit fullscreen mode

Check:

✅ Website loads

✅ Browser shows a lock icon

✅ URL begins with

https://
Enter fullscreen mode Exit fullscreen mode

If you still see "Not Secure," verify that:

  • The ACM certificate status is Issued.
  • The HTTPS listener is using the correct certificate.
  • Your Route 53 Alias record points to the correct ALB.
  • DNS changes have had time to propagate.

Common Problems

Problem 1

Certificate stuck in

Pending Validation
Enter fullscreen mode Exit fullscreen mode

Possible cause:

DNS validation record was not created correctly or DNS changes have not propagated yet.


Problem 2

Website still opens with HTTP

Possible cause:

No redirect rule on port 80.


Problem 3

Browser says

Certificate Error
Enter fullscreen mode Exit fullscreen mode

Possible causes:

  • Wrong certificate attached.
  • Certificate does not include the domain you are visiting.
  • Certificate is not in the same AWS Region as the ALB.

Problem 4

Website cannot be reached

Possible causes:

  • Alias record points to the wrong ALB.
  • Load Balancer is unhealthy.
  • Security Groups are blocking traffic.

Production Best Practices

Always:

  • Use HTTPS for public websites.
  • Redirect HTTP to HTTPS.
  • Keep DNS records organized.
  • Use Alias records for ALBs.
  • Monitor certificate expiration (ACM-managed public certificates renew automatically when validation remains in place and the certificate is still in use).

Lab Checklist

Complete the following:

✅ Create a Public Hosted Zone

✅ Create an Alias Record

✅ Point your domain to the ALB

✅ Request an ACM Public Certificate

✅ Validate the certificate using DNS

✅ Wait for the certificate status to become Issued

✅ Add an HTTPS Listener (443)

✅ Attach the ACM Certificate

✅ Redirect HTTP (80) to HTTPS (443)

✅ Open the website using HTTPS


Interview Questions

1. What is Route 53?

AWS's DNS service that maps domain names to AWS resources and other destinations.


2. What is DNS?

The Domain Name System translates human-readable domain names into network addresses.


3. Why do companies use custom domains?

To provide a professional, memorable address for customers instead of AWS-generated hostnames.


4. What is AWS Certificate Manager?

A service that issues and manages SSL/TLS certificates for supported AWS services.


5. Why do we use HTTPS?

To encrypt communication between users and the application, protecting sensitive data in transit.


6. What is the difference between HTTP and HTTPS?

HTTP sends traffic without encryption. HTTPS uses TLS to encrypt the connection.


7. Why do we use an Alias Record instead of a normal A Record?

Because an Application Load Balancer does not have a fixed IP address. Alias records automatically track the AWS resource.


8. Why do we redirect HTTP to HTTPS?

To ensure all users access the secure version of the website, even if they initially enter an HTTP URL.


Homework

  1. Purchase or use an existing domain.
  2. Create a Public Hosted Zone in Route 53.
  3. Create an Alias A record pointing to your ALB.
  4. Request an ACM public certificate for your domain.
  5. Validate the certificate using DNS.
  6. Add an HTTPS listener (443) to your ALB.
  7. Configure HTTP (80) to redirect to HTTPS.
  8. Verify that your website loads with a valid HTTPS connection.
  9. Take screenshots of:
  • Hosted Zone
  • Alias Record
  • ACM Certificate (Issued)
  • ALB Listeners
  • Website showing the HTTPS lock icon

After completing this lab, students will have a professional deployment with a custom domain and encrypted HTTPS traffic, similar to what is commonly used for public-facing applications in AWS.

Top comments (0)