0
0
AWScloud~10 mins

Hosted zones concept in AWS - Step-by-Step Execution

Choose your learning style9 modes available
Process Flow - Hosted zones concept
Create Hosted Zone
Assign Domain Name
Add DNS Records
DNS Queries Received
Route Traffic Based on Records
Respond to DNS Queries
This flow shows how a hosted zone is created, assigned a domain, configured with DNS records, and then used to route traffic when DNS queries arrive.
Execution Sample
AWS
Create hosted zone for example.com
Add A record pointing to 192.0.2.1
DNS query for www.example.com
Resolve to 192.0.2.1
This example shows creating a hosted zone, adding a record, and resolving a DNS query using that record.
Process Table
StepActionInputState ChangeOutput
1Create hosted zoneDomain: example.comHosted zone 'example.com' createdHosted zone ready
2Add DNS recordType: A, Name: www, Value: 192.0.2.1Record added to hosted zoneRecord stored
3Receive DNS queryQuery: www.example.comLookup in hosted zone recordsFound A record
4Route trafficUse A record valuePrepare response with IPRespond with 192.0.2.1
5EndNo more queriesNo state changeProcess complete
💡 No more DNS queries to process, hosted zone serves all configured records
Status Tracker
VariableStartAfter Step 1After Step 2After Step 3After Step 4Final
HostedZoneNoneexample.com createdexample.com with www A recordexample.com with www A recordexample.com with www A recordexample.com with www A record
DNSRecordsEmptyEmptyA record for www addedA record for www presentA record for www presentA record for www present
DNSQueryNoneNoneNoneQuery for www.example.comQuery resolvedNone
ResponseNoneNoneNoneNoneIP 192.0.2.1 sentNone
Key Moments - 3 Insights
Why do we need to create a hosted zone before adding DNS records?
Because the hosted zone is like a container for all DNS records of a domain. Without it, there is no place to store or manage the records. See execution_table step 1 and 2.
What happens if a DNS query is received for a name not in the hosted zone?
The hosted zone will not find a matching record and cannot resolve the query. This is why only configured records respond. See execution_table step 3.
How does the hosted zone respond to DNS queries?
It looks up the requested name in its records and returns the associated value, like an IP address. See execution_table steps 3 and 4.
Visual Quiz - 3 Questions
Test your understanding
Look at the execution_table, what is the state of DNSRecords after step 2?
AA record for www added
BQuery for www.example.com received
CEmpty
DHosted zone deleted
💡 Hint
Check the 'State Change' column in row for step 2.
At which step does the hosted zone respond with the IP address?
AStep 3
BStep 4
CStep 1
DStep 5
💡 Hint
Look for 'Respond with 192.0.2.1' in the 'Output' column.
If no DNS records are added, what will happen when a DNS query arrives?
AHosted zone will respond with IP
BHosted zone will create a record automatically
CHosted zone will not find a matching record
DHosted zone will delete itself
💡 Hint
Refer to key_moments explanation about queries without matching records.
Concept Snapshot
Hosted zones are containers for DNS records of a domain.
Create a hosted zone before adding records.
Add DNS records like A, CNAME inside the hosted zone.
DNS queries are answered by looking up these records.
No records means no resolution for queries.
Hosted zones route traffic by responding with record values.
Full Transcript
A hosted zone is like a folder that holds all the DNS records for a domain name. First, you create the hosted zone for your domain, for example, example.com. Then you add DNS records inside it, such as an A record that points www.example.com to an IP address. When someone asks for www.example.com, the hosted zone looks up the record and replies with the IP address. If no record matches the query, the hosted zone cannot answer. This process helps route internet traffic to the right place.