AWS Builder Center

How Does a Domain Find Your Application? Understanding DNS and Amazon Route 53

You type: into your browser. A few moments later, your application appears. But how does your computer know where mywebsite.com actually lives? The answer starts with a technology that is fundamental to the internet: DNS — Domain Name System. And in AWS, one of the services used to manage DNS is Amazon Route 53.

What Is DNS?

Computers communicate using IP addresses.
For example:
1
192.0.2.10
But remembering IP addresses for every website would be difficult.
Instead, we use domain names:
1
mywebsite.com
DNS works like a directory that helps translate between names and addresses.
A simplified view is:
1
2
3
4
5
6
7
8
9
10
Domain Name
│
▼
DNS
│
▼
IP Address
│
▼
Server
So when you enter a domain into your browser, DNS helps your device discover where the application can be reached.

Why Do We Need DNS?

Imagine if websites worked like this:
1
2
3
https://192.0.2.10
https://198.51.100.20
https://203.0.113.15
It would be difficult for people to remember.
Instead, we can use:
1
2
3
google.com
amazon.com
mywebsite.com
DNS provides the translation layer between human-friendly names and network addresses.

What Is Amazon Route 53?

Amazon Route 53 is AWS's highly available and scalable DNS and domain management service.
It can be used to:
  • Register domains
  • Manage DNS records
  • Route traffic to applications
  • Perform health checks
  • Connect domains to AWS resources
The basic idea is:
1
2
3
4
5
6
7
8
9
10
USER
│
▼
mywebsite.com
│
▼
Route 53
│
▼
Application
Route 53 doesn't run your application.
Its job is to help determine where traffic should go.

What Happens When You Type a Domain?

Let's follow a simplified request.
You enter:
1
https://mywebsite.com
Your device needs to discover the destination.
Conceptually:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
Browser
│
│ "Where is mywebsite.com?"
▼
DNS Resolver
│
▼
Route 53
│
▼
IP / AWS Resource
│
▼
Application
After DNS resolution, the browser can connect to the destination.
The real DNS resolution process involves additional components and caching, but this simplified model is enough to understand the main idea.

DNS Records

DNS doesn't only store domain names.
It uses records to define how a domain should behave.
For example, an A record can associate a domain with an IPv4 address.
Conceptually:
1
2
3
4
5
6
7
mywebsite.com
│
▼
A Record
│
▼
192.0.2.10
There are also other types of records.
For example:
1
2
3
4
5
A → IPv4 address
AAAA → IPv6 address
CNAME → Another domain name
MX → Mail servers
TXT → Text information
You don't need to memorize every record when starting.
The important idea is:
DNS records tell the DNS system how a domain should be resolved.

What If Your Application Doesn't Have a Fixed IP?

This is where cloud architectures become interesting.
Imagine your application is behind a load balancer:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
User
│
▼
Domain
│
▼
Route 53
│
▼
Load Balancer
│
├── Application
├── Application
└── Application
The user doesn't need to know which individual server is running the application.
Route 53 can direct the domain toward the appropriate AWS resource.
This is one reason DNS becomes an important abstraction layer in cloud architectures.

Route 53 and Load Balancers

Imagine an application running on multiple servers:
1
2
3
4
5
6
7
8
9
10
mywebsite.com
│
▼
Route 53
│
▼
Load Balancer
/ | \
▼ ▼ ▼
App 1 App 2 App 3
The domain gives users a stable entry point.
Behind that entry point, the infrastructure can change.
You could add another application server:
1
2
3
4
App 1
App 2
App 3
App 4
The user can continue accessing:
1
mywebsite.com
They don't need to know about the internal infrastructure.

DNS and CloudFront

Route 53 can also be used with CloudFront.
For example:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
User
│
▼
mywebsite.com
│
▼
Route 53
│
▼
CloudFront
│
├── Cache
│
└── Origin
This creates a common architecture for websites and applications.
Route 53 helps resolve the domain.
CloudFront distributes content.
The origin provides the actual content.
Each service has a different responsibility.

What Is DNS Routing?

DNS can do more than simply point a domain to one destination.
Route 53 supports different routing policies.
For example, you can build architectures that route traffic based on:
  • Geographic location
  • Latency
  • Weighted percentages
  • Health status
  • Failover requirements
Imagine you have two application environments:
1
2
3
4
5
mywebsite.com
│
┌─────┴─────┐
▼ ▼
Region A Region B
DNS routing can become part of a strategy for availability and traffic management.

Health Checks and Failover

Imagine your application has two environments:
1
2
3
4
5
6
Route 53
│
┌──────┴──────┐
▼ ▼
Server A Server B
Healthy Backup
If Server A becomes unavailable, a failover configuration can help direct traffic to another destination.
The exact architecture depends on the application and the routing configuration.
The important idea is:
DNS can participate in availability strategies.

DNS Is Not the Same as Hosting

This distinction is important.
If you buy a domain:
1
mywebsite.com
you haven't automatically created a website.
You still need somewhere to host the application.
For example:
1
2
3
4
5
6
7
8
9
10
Domain
│
▼
Route 53
│
▼
CloudFront
│
▼
S3 / App
The domain is the name.
The hosting infrastructure is where the application actually runs.

A Complete AWS Example

Let's put several concepts together.
Imagine a modern web application:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
USER
│
▼
mywebsite.com
│
▼
┌──────────┐
│ Route 53 │
└────┬─────┘
│
▼
┌──────────┐
│CloudFront│
└────┬─────┘
│
▼
┌───────────────┐
│ Load Balancer │
└───────┬───────┘
│
┌──────┴──────┐
▼ ▼
App 1 App 2
│ │
└──────┬──────┘
▼
Database
At first glance, this may look complicated.
But each layer has a purpose:
ComponentResponsibility
Route 53DNS and traffic routing
CloudFrontContent delivery and caching
Load BalancerDistribute application traffic
ApplicationBusiness logic
DatabasePersistent data
This separation is one of the foundations of cloud architecture.

A Simple Mental Model

When you see a domain in an AWS architecture, think:
1
2
3
4
5
6
7
8
9
10
DOMAIN
│
▼
DNS
│
▼
"Where should I go?"
│
▼
AWS Resource / App
Route 53 helps answer the question:
Where should this domain's traffic go?
That's its role in the architecture.

Final Thoughts

DNS is one of those technologies that most people use every day without thinking about it.
Every time you type a domain into your browser, DNS is helping your device find the destination.
Amazon Route 53 brings these capabilities into AWS and allows DNS to become part of your cloud architecture.
Once you understand the relationship between:
Domain → DNS → Route 53 → Application
many other AWS concepts become easier to understand.
And as your applications become more complex, DNS can do much more than simply point a name to an IP address.
It can become an important part of traffic management, availability, and cloud architecture.
Any opinions in this article are those of the individual author and may not reflect the opinions of AWS.
Enjoyed reading this content? Let the author know!

Your likes, comments, shares, and saves help creators reach more builders.

Loading recommendations

Loading article