Ravindra BagaleCourses & study guides मराठी Track your progress

AWS Cloud

Chapter 9: Domain Names, DNS and Subdomains

Hello friends! So far we opened our website with an IP address. But how will the customers of Mauli Dairy, Pune (a fictional business, only for learning) remember that number? In this chapter we give the server a real name – domain, www and subdomains – and understand what happens behind the scenes when someone types the name. We take GoDaddy as the example, but the steps are almost the same at other registrars. Keep both the browser and the terminal open.

In this chapter

  • Parts of a domain name
  • How DNS resolution works
  • Record types and TTL
  • Plan the endpoint before DNS
  • GoDaddy DNS and Route 53
  • server_name for your domain
  • dig, nslookup and caches
  • Subdomains and HTTPS

Friends, so far we have opened our websites with http://192.0.2.25. It works, but nobody will remember that number, and you can't put it on a visiting card. In this chapter we give our server a real name like example.com, add www, create subdomains like blog.example.com and api.example.com, and understand what happens behind the scenes when someone types that name. We'll use GoDaddy as the registrar example because many of you already have an account there, but the steps are almost the same on Namecheap, Hostinger, BigRock or Route 53. Come on, let's give our server a name – and Mauli Dairy's website too!

 You type example.com
        |
        v
 +-------------+  1. "IP of example.com?"  +----------------+   2. root servers
 |  Browser /  | ------------------------> |  DNS resolver  |   3. .com TLD servers
 |  OS cache   | <------------------------ |  (recursive)   |   4. authoritative NS
 +-------------+  6. "192.0.2.25"        +----------------+      (GoDaddy / Route 53)
        |                                          ^
        | 7. HTTP GET  Host: example.com           | 5. A example.com = 192.0.2.25 (+ TTL)
        v                                          |
 +-------------------------------+        +------------------+
 | EC2 (Elastic IP 192.0.2.25) |        | Authoritative NS |
 | Nginx/Apache: server_name     |        +------------------+
 +-------------------------------+

Concepts in this chapter

  1. 9.1What is a domain name?
  2. 9.2How DNS resolution works
  3. 9.3DNS record types you must know
  4. 9.4Before you point a domain: prepare the server
  5. 9.5Buying a domain on GoDaddy
  6. 9.6Pointing a GoDaddy domain to EC2 (GoDaddy DNS)
  7. 9.7Alternative: GoDaddy registrar + Route 53 DNS
  8. 9.8Configure the web server for the domain
  9. 9.9Verify DNS: dig, nslookup and friends
  10. 9.10Subdomains
  11. 9.11HTTPS for your domain and subdomains
  12. 9.12Troubleshooting domains

Review and practice

  1. ★Common Mistakes I See Students Make
  2. ★Interview Questions
  3. ★Practice Questions and Lab Exercises

Follow a name into the requested website

Follow a name into the requested websiteAuthoritative zoneDelegation chooses the sourceResolver answerFind the intended destinationConnection and TLSReach and validate the serviceRequested siteVerify the actual content
Read all steps
  1. Authoritative zone

    The registrar-side delegation identifies the intended nameservers. A same-named zone in another dashboard does not become authoritative merely because its records look correct.

  2. Resolver answer

    A resolver can use suitable cached data or obtain a new answer. Record the name, type, value and observation point before interpreting an older result.

  3. Connection and TLS

    Connect to the intended endpoint. For ordinary HTTPS, TLS negotiation and hostname validation precede the protected HTTP request; SNI can help select the certificate.

  4. Requested site

    The request authority selects the configured website, and its path selects the resource. Compare the expected timetable or registration result, not just a successful DNS lookup.

Give students a stable name for a changing service

The college workshop team has published its timetable on a server. Students can open the page using an address, but that is an awkward way to share it. The address might change when the team replaces the server. The timetable also needs a name that can appear on posters, and the registration application needs a separate name that people can recognize. Domain names let the team describe services without asking every student to memorize their current network addresses.

Think of the name as an identifier whose supporting configuration must be maintained. A sign saying “Workshop office” is useful only if the directory sends visitors to the current office and someone actually answers there. Similarly, a registered name, a DNS answer and a functioning website are related pieces with different responsibilities. This chapter connects them while keeping each responsibility visible.

We will use names under example.com for paper examples and workshop.test for a local experiment. The documentation addresses in diagrams are examples, not instructions to contact someone else's server. Our practical exercise does not buy a domain, edit a public zone or change your computer's resolver. You can learn the distinction between destination and requested hostname using a small loopback service before applying it to an assigned domain.

By the end, you should be able to explain a working name from registration through delegation, DNS lookup, network connection, TLS and the requested resource. You should also know which observation to collect when one part fails. Remembering record abbreviations helps, but explaining the request path is what turns that knowledge into a useful skill.

Separate registration, DNS hosting and website hosting

Domain registration gives a registrant the use of a name for a registration period under the applicable rules. A registrar manages that relationship, renewal and registration settings. Registration does not automatically create your timetable, configure your application or make a particular virtual machine reachable. A bundled product might offer several services together, but the responsibilities remain separate.

DNS hosting supplies authoritative DNS data for a zone. The records can describe addresses, aliases, mail routing and other information. A provider's management interface lets the authorized operator maintain those records. The public delegation must direct queries to the intended nameservers for that zone. Records displayed in an unused zone can look perfectly correct without affecting what public users receive.

Website hosting supplies the content and application behavior. It may be an EC2 instance running Nginx, a managed hosting service, a content delivery arrangement or another suitable system. It needs the correct site configuration, network path and application. DNS does not copy the timetable onto that system. It gives clients information used to find the service.

A college could keep GoDaddy as registrar, use GoDaddy DNS and serve the website on EC2. It could also keep GoDaddy as registrar, delegate DNS to Route 53 and use the same EC2 service. Moving the authoritative DNS service does not require transferring the registration. Moving the website does not necessarily require changing the nameservers. First identify which responsibility is actually changing.

Make a three-row ownership record: who renews the registration, who maintains the authoritative zone and who operates the application. Include the account or team responsible without exposing credentials. When a timetable fails, this record prevents the operator from searching the registrar's website for a server configuration problem or restarting a server to fix an expired registration.

Read a name and distinguish it from a URL

In www.example.com, the labels are separated by dots. Read the hierarchy from the right: com is a top-level domain, example is below it and www is another label below example.com. A fully qualified presentation can end with a dot representing the DNS root. This root is different from the informal expression “root domain” that people sometimes use for the base name they registered.

The zone apex is the name at the top of a particular authoritative zone. For a zone named example.com, that apex is example.com. If the team delegates labs.example.com into its own zone, labs.example.com is the apex of that child zone. A subdomain is a relationship in the namespace; a zone is an administrative division of DNS data. Creating an ordinary subdomain record does not always create a separate zone.

A URL contains more than a hostname. In https://register.example.com/sessions?day=2, the scheme indicates HTTPS, register.example.com is the hostname, /sessions is the path and day=2 is a query component. Ordinary A and AAAA lookups concern the name. They do not inspect the /sessions page or decide which query parameter the application should use.

The www name is a convention, not an automatic synonym supplied by the internet. The apex and www are separate names that need the intended DNS and web configuration. You can serve both, choose one canonical public address and redirect the other through the web service. A CNAME by itself does not make the browser's address bar switch to the target name.

Provider interfaces can represent the apex with an at sign or an empty name field. Some editors append the zone name to short labels, while others accept full names. Read the field's explanation before entering a value. A repeated name such as www.example.com.example.com is a data-entry mistake, not a mysterious propagation delay.

Follow a lookup without assuming every visit starts from the root

A browser needs address information before it can connect to a named service. The application's name-resolution path may use operating-system facilities, browser settings or an explicitly configured DNS service. For our basic model, a client asks a recursive resolver to obtain the answer. That resolver can answer from suitable cached data or perform further work to find it.

When the required information is not cached, the resolver follows delegations. Root servers can direct it toward the relevant top-level domain servers. The top-level domain can direct it toward the nameservers responsible for the registered domain. Those authoritative servers can answer for their zone or refer the resolver to a delegated child. The root servers are not a master spreadsheet containing every website's current address.

An authoritative server answers from the zone data it serves. A recursive resolver works on behalf of clients, finding and caching answers under its policies. The same software can be configured for different roles, but the roles are different. In a troubleshooting record, note whether you asked a recursive resolver or a particular authoritative server, because their answers can reflect different stages of an update.

A resolver may already know the nameservers for the domain even when it needs a fresh address record. It can reuse that delegation information rather than repeating every step. Different records also have different cache lifetimes. A simple arrow diagram is a learning model for the dependency chain, not a guarantee that every browser visit sends the exact same number of packets.

DNS can run over more than one transport arrangement. Common DNS uses UDP or TCP, and encrypted DNS mechanisms also exist. This chapter focuses on the meaning of the query and response rather than assuming all DNS traffic has one transport. A network that permits your configured recursive resolver might still block direct queries to arbitrary authoritative servers, which matters when a tracing command fails.

Choose the record for the information you need to publish

An A record provides IPv4 address information for its owner name. An AAAA record provides IPv6 address information. These records do not include an HTTP path, a URL scheme or an ordinary website port number. If the team publishes an address, the corresponding endpoint still needs routing, listener configuration and the intended service. A correct-looking address value is one dependency, not a complete deployment.

A CNAME makes one DNS name an alias of another name. It is useful when the service provider tells you to reference a hostname instead of copying an address that the provider might change. The target is a name, not a URL with a path. Ordinary CNAME data cannot coexist with other ordinary data at the same owner name; that is why the apex, which has required zone data, needs special consideration.

Route 53 offers an alias feature for supported targets. It can be used at the apex in cases where an ordinary CNAME cannot. It is a provider feature with specific target rules, not a new universal DNS record type that every server must display as “ALIAS.” A public lookup can show the resulting A or AAAA answer. Check the provider configuration to determine whether that answer came from an alias arrangement.

MX records identify mail exchangers and include preference values. Lower preference numbers are preferred among available MX choices. An MX target is a hostname, not an email address or a web page. TXT records carry text used by different protocols and verification systems. The consuming protocol determines what a particular text value means. Publishing a random TXT string does not automatically enable email authentication.

NS records identify authoritative nameservers. SOA data includes zone administration information such as a serial and timing fields, including information used by negative caching. These records support DNS operation; they are not the IP address of the workshop application. Preserve provider-generated zone information according to the provider's instructions instead of replacing it with a web-server address.

RequirementTypical starting pointSeparate check
Reach a known IPv4 endpointA recordAddress ownership and application path
Publish a working IPv6 endpointAAAA recordIPv6 route, listener and rules
Use a provider's service hostnameCNAME or supported alias designAllowed target and apex constraints
Deliver incoming mailMail provider's MX recordsAssociated text policies and actual mail service
Delegate DNS responsibilityCorrect parent delegation and child zoneNameserver set and consistent authoritative answers

Use a timeline to understand caching

Suppose a recursive resolver receives the workshop A record at 10:00 with a TTL of 600 seconds. In the basic cache model, it can reuse that answer for up to ten minutes without obtaining it again. At 10:03, the operator changes the authoritative address. That edit does not send a command to every resolver telling it to discard its previously cached answer. The resolver may continue using its earlier data until it refreshes.

Now suppose the operator lowers the authoritative TTL to sixty seconds at 10:02. A resolver that already cached the earlier six-hundred-second response still holds the old lifetime. Lowering a value does not retroactively shorten every existing cache entry. For a planned move, adjust the relevant TTL early enough for older entries to age out before relying on the new shorter value.

TTL is not a promise that every application worldwide will show one new result at the same instant. Several caches, resolver policies, delegation data and client behavior can affect observations. Provider-side publication and downstream caching are also different stages. When a provider says a change has reached its own authoritative servers, that statement does not prove every recursive resolver has replaced its cached response.

Negative caching explains another confusing case. A student checks register.example.com before the record exists. The resolver receives a negative answer and may cache it under the relevant rules. After the operator creates the record, that student's resolver may temporarily retain its negative result. A nonexistent name and a name that exists without the requested record type are distinct responses; keep that distinction in the investigation.

Do not diagnose every failure as caching. If the delegated authoritative server still returns the wrong address, waiting for a browser cache to expire cannot correct the authoritative data. If a record was edited in a zone that is not delegated, the public answer may never change. Compare the authoritative answer, the resolver answer and the requested name before deciding that time is the only missing ingredient.

Plan the GoDaddy and Route 53 arrangements

In the first arrangement, the registration uses GoDaddy's assigned nameservers and the records are maintained in that active GoDaddy zone. The operator reviews the current records, identifies the exact name and type being changed, enters the approved endpoint and verifies the published answer. The registrar and DNS host happen to be the same company, but the website can still run on EC2.

In the second arrangement, the registration stays with GoDaddy while a Route 53 public hosted zone supplies authoritative DNS. Route 53 assigns a nameserver set to that zone. The domain's registrar-side delegation must refer to that exact intended set. Creating another hosted zone with the same name can produce a different set; matching the zone name alone is not enough to identify the active zone.

Before a DNS-hosting migration, inventory the complete current zone. The website's A record may be only one part. Mail delivery, email authentication, ownership verification and other subdomains can depend on records that are not visible when you open the homepage. Copy and review the needed data in the destination according to the migration procedure before changing delegation.

A signed zone also requires a DNSSEC transition plan. DNSSEC helps validate DNS data authenticity; it does not encrypt the website or replace TLS. A mismatched parent trust record and child signing arrangement can cause validating resolvers to reject answers. Follow the provider's current documented migration sequence with the domain owner rather than treating a nameserver switch as an isolated edit.

Maintain the old working service for the planned transition and recovery period. Delegation caches can outlive a quick control-panel change. Reverting a nameserver field is therefore not an instant worldwide rollback. Keep evidence of the old and new answers, verify mail and important names, and close the migration only after the relevant service checks pass.

Prepare the endpoint before directing students to it

For a direct EC2 IPv4 example, use an address arrangement whose lifecycle you understand. An automatically assigned public IPv4 address can change across certain lifecycle operations. An Elastic IP is an allocation you can associate under the service's rules while you retain it; it is not a permanent entitlement after release. Review current charges and the resource owner before choosing the design.

A load balancer or content delivery service can expose a provider hostname with its own DNS integration. Do not discover one current address behind that service and assume it is a stable value to copy into a permanent record. Use the documented supported record or alias arrangement for that endpoint. The direct-instance example is one architecture, not a requirement for every AWS website.

Confirm the application and named site configuration before publishing the address. A loopback request from the server demonstrates a different network path from a student's remote request. A connection to an IP address can select a default site instead of the requested workshop hostname. Use an explicit name-aware test to separate the destination from virtual-host selection.

When retiring an endpoint, remove or update DNS references before releasing resources under the approved plan. A leftover record can keep directing clients to an address or service name that no longer belongs to the project. The resource inventory and the DNS inventory should agree. A completed server cleanup is not complete service cleanup when the public name still advertises the old destination.

Separate DNS, TLS and HTTP site selection

Imagine that workshop.example.com and register.example.com resolve to the same address. The destination tells the client where to connect, but the web service also needs to know which named site the user requested. In an ordinary HTTP/1.1 request, the Host field carries that information. HTTP/2 and HTTP/3 represent the request authority through their own protocol mechanisms. The practical point is that a shared address does not mean every name must receive the same content.

For a typical HTTPS connection over TCP, the client first connects, then negotiates TLS, then sends the protected HTTP request. The TLS Server Name Indication extension can communicate the requested DNS hostname during the handshake so a shared endpoint can select the appropriate configuration and certificate. This selection happens before the server reads the encrypted HTTP request. Keep that order clear when drawing the flow.

The client checks the certificate against the requested identity and its trust rules. A certificate for one hostname does not automatically cover every other name that resolves to the same address. A wildcard identity has matching rules and does not mean every possible nested name or the apex is covered. List the actual names your service needs and verify the certificate's identities rather than inferring them from the DNS record.

HTTPS does not repair incorrect content mapping. A trusted, correctly named TLS connection can still return the wrong timetable or a missing page. Similarly, an HTTP response from a direct IP test does not prove the hostname's TLS configuration. Use separate checks for name resolution, connection, certificate validation, site selection and the expected application result.

A command-line override can test a proposed endpoint while retaining the requested hostname. With curl, the resolve option supplies an address for a particular name-and-port pair. In an HTTPS test, keeping the hostname in the URL also preserves the relevant hostname-based validation behavior. Turning certificate verification off would remove useful evidence, so it is not part of this chapter's verification method.

Design subdomains around service responsibility

A subdomain can identify a separate service such as registration, documentation or an API. It can point to the same endpoint as the main website or to another endpoint. DNS naming does not require one virtual machine per name. The hosting design determines whether the services share a process, use separate containers or run on different managed services.

A subdomain is also different from a path. register.example.com and example.com/register can be arranged to reach similar application behavior, but they have different names, certificate requirements and web configuration. Choose a naming plan that the team can explain and maintain. Do not add subdomains simply because a page has a different heading.

If another team should operate the DNS below labs.example.com, the parent can delegate that child namespace to a separate authoritative zone. The child then has its own zone administration and records. An ordinary A record for labs.example.com does not perform that delegation. Draw the boundary and identify which team edits the parent delegation versus the child data.

Wildcard DNS also deserves a precise explanation. It can synthesize answers under specific DNS matching rules, but it does not create an application route, grant access or obtain a matching certificate. An explicit record or delegated boundary can affect matching. Beginners should first configure a small set of explicit service names and test them individually before relying on wildcard behavior.

Record each name, responsible team, destination design, required TLS identity and retirement procedure. That small inventory becomes valuable when a course project grows from one timetable to a registration portal and an API. It helps prevent a forgotten subdomain from continuing to advertise an endpoint that has been removed or reassigned.

Lab: read public DNS responses without changing them

Use a terminal with dig installed. These queries examine the reserved example.com documentation domain and a name under the reserved invalid top-level domain. They do not edit DNS records or access a private account. Your network may restrict DNS traffic, so a timeout is an observation about this query path. It is not proof that the queried domain has no records.

dig example.com A +time=3 +tries=1
dig example.com AAAA +time=3 +tries=1
dig example.com NS +time=3 +tries=1
dig example.com SOA +time=3 +tries=1
dig workshop-name.invalid A +time=3 +tries=1

Read the response header before scanning the answer. Note the status, requested name and type, the server that answered and the answer section. For an address record, identify the owner name, TTL, class, type and value. Public values can change, so the exercise asks you to interpret your actual output instead of copying a fixed address printed in a tutorial.

For the invalid name, expect a name-error result from a functioning resolver rather than an address. Distinguish that DNS response from a network timeout. A response with a successful DNS status and no answer of the requested type is another possibility for other names. The answer count by itself does not tell you which case occurred. Keep the status and authority information in your notes.

Repeat one query and compare the TTL and responding server. A lower TTL can be consistent with a cached answer, but a different backend or policy can produce a different observation. Do not conclude that you personally watched every caching stage from two commands. State the narrower evidence: which server answered, which value it returned and what lifetime appeared in that response.

For an assigned domain, an instructor can provide a verified authoritative nameserver for a direct nonrecursive comparison. A resolver's response and an authoritative response answer different investigative questions. A trace command can follow delegations but may require network access that your normal resolver path does not. If that direct path is blocked, retain the successful ordinary lookup and explain the limitation.

Lab: keep the address fixed and change the requested name

This experiment uses Python 3 and curl on your own learning computer. It creates a small HTTP service bound only to loopback on port 18889. The service returns one marker for workshop.test and another for register.test. Both requests connect to the same address and port. This isolates the requested-name decision from public DNS.

Create a new practice directory and write the small server. Read the code even if Python is new to you. The handler reads the Host field, removes the port for this controlled pair of names and selects a response from a two-entry dictionary. An unrecognized name receives a 404. This is a teaching handler, not a production web-server configuration.

dns_lab=$(mktemp -d /tmp/workshop-names.XXXXXX)
cat > "$dns_lab/server.py" <<'PY'
from http.server import BaseHTTPRequestHandler, HTTPServer

class Handler(BaseHTTPRequestHandler):
    def do_GET(self):
        host = self.headers.get("Host", "").partition(":")[0].lower()
        pages = {
            "workshop.test": "Workshop timetable: Room A\n",
            "register.test": "Registration desk: Room B\n",
        }
        body = pages.get(host, "Unknown practice name\n").encode()
        self.send_response(200 if host in pages else 404)
        self.send_header("Content-Type", "text/plain; charset=utf-8")
        self.send_header("Content-Length", str(len(body)))
        self.end_headers()
        self.wfile.write(body)

HTTPServer(("127.0.0.1", 18889), Handler).serve_forever()
PY
printf 'Name lab directory: %s\n' "$dns_lab"

Start the service in the same terminal. It stays in the foreground. If the port is already occupied, do not stop an unrelated process. Choose another unused high port consistently in the code and requests, or finish the existing exercise first. The service does not need administrator privileges.

python3 "$dns_lab/server.py"

Open a second terminal and run these three requests. The resolve option supplies a temporary address mapping for each exact hostname and port in that curl invocation. The URL still contains the requested name. The no-proxy setting keeps this local exercise from being sent through a configured HTTP proxy.

curl --noproxy '*' --max-time 5 -i --resolve workshop.test:18889:127.0.0.1 http://workshop.test:18889/
curl --noproxy '*' --max-time 5 -i --resolve register.test:18889:127.0.0.1 http://register.test:18889/
curl --noproxy '*' --max-time 5 -i --resolve unknown.test:18889:127.0.0.1 http://unknown.test:18889/

The first response should be 200 with the Room A timetable marker. The second should be 200 with the Room B registration marker. The third should be 404 with the unknown-name marker. The address and port were identical, yet the requested names selected different behavior. That is the observation you should explain in your lab record.

Now request the numeric loopback URL without supplying one of the recognized names. The handler sees the numeric host and returns its unknown-name response. Then supply an explicit Host field for the workshop name while keeping the numeric destination. This comparison shows why “the IP works” and “the domain works” can describe different request conditions.

curl --noproxy '*' --max-time 5 -i http://127.0.0.1:18889/
curl --noproxy '*' --max-time 5 -i -H 'Host: workshop.test' http://127.0.0.1:18889/

The two expected statuses are 404 and 200. The second body should again identify Room A. This plain HTTP experiment does not exercise TLS or SNI. For HTTPS, a Host header supplied after connecting to a numeric URL is not a replacement for preserving the intended hostname through the TLS handshake. The distinction is one reason name-aware connection overrides are useful.

Return to the first terminal and press Ctrl+C to stop this foreground server. Confirm that the command returns to your prompt. The second terminal should then fail to connect to this practice listener. Inspect the printed practice directory; you can remove its one known server file and the empty directory when you no longer need them. Keep the observation record separately.

This lab deliberately bypasses public DNS for its curl requests. It proves the selected destination and HTTP name handling in a controlled service. It does not prove a public record exists, that a registrar delegates correctly or that a certificate is trusted. A clear lab conclusion includes those limits so you do not mistake a useful partial test for a complete deployment test.

Investigate the first observation that disagrees with the plan

If the name does not resolve, record the exact spelling and requested record type. Inspect the response status and server. Compare the public delegation with the nameservers of the zone you edited. If there are several same-named hosted zones, identify the delegated one by its nameserver set. Waiting cannot make a record in an unrelated zone authoritative.

If authoritative data is correct but one recursive answer is older, compare the relevant TTLs and recent changes. Include negative answers in the timeline. Check whether the affected client uses a different resolver or a private DNS view. A VPN or organizational network can intentionally return different data from public DNS, so label the vantage point rather than assuming one answer must be malicious or broken.

If address resolution succeeds but the connection fails, investigate the destination and network path. Verify that the endpoint is still owned by the project, that the intended listener exists and that the relevant rules permit the connection. Do not keep editing DNS while the returned address already matches the approved endpoint. A refused connection and a timeout are different observations with different possible causes.

If IPv4 works but IPv6 does not, inspect AAAA data and the IPv6 serving path. An old AAAA value can direct capable clients somewhere unexpected even while the A record is correct. Browser connection-selection behavior can make the symptoms vary across networks. Test the families separately where your network supports them, then repair the intended design rather than adding more random records.

If the wrong website appears, compare the requested hostname with the server's selected virtual host and the content marker. If TLS fails, inspect the requested identity, certificate validity and trust chain without bypassing verification. If mail fails after a DNS migration while the homepage works, review the migrated MX and related TXT data. Each symptom points to a particular part of the chain.

Finish with a precise incident note. State the observed answer, affected name and type, responsible configuration, correction and verifying request. Include any remaining client-cache limitation. A sentence such as “the registrar still delegated to the old nameserver set” is more useful than “DNS was slow,” because it explains what changed and how another operator can confirm it.

Practice tasks with evidence to collect

  1. Separate the service owners. Draw three boxes for registrar, authoritative DNS and web hosting. Put one team beside each box and show which setting connects the boxes. Explain why moving the web files does not automatically change the registration.
  2. Read five response fields. From one dig response, identify the question, status, answering server, record value and TTL. Explain what each field tells you and one thing it does not establish about the application.
  3. Calculate a cache timeline. A resolver caches an answer at 14:00 with a TTL of nine hundred seconds. The authoritative record changes at 14:05. Under the simple cache model, calculate when the earlier entry reaches its lifetime. Explain why lowering the authoritative TTL at 14:06 does not rewrite that existing cache entry.
  4. Compare the two local names. Record the two successful bodies and the unknown-name response from the loopback lab. Draw one network endpoint and two requested hostnames. Describe where the handler made the content decision.
  5. Review a migration inventory. Prepare a paper zone containing a website address, a registration alias, mail exchangers and verification text. Mark which entries would be lost if the operator copied only the website address to a new DNS provider.
  6. Investigate a mixed-family failure. Create a paper scenario where the A record matches the current service but the AAAA record names an old endpoint. Specify separate DNS and connection observations that would support that explanation. Do not claim the AAAA value is the cause until the evidence matches.

Interview questions with explained answers

Can a domain registered at GoDaddy use Route 53 and an EC2 website?

Yes. Registration, authoritative DNS and website hosting can be supplied separately. The registrar's delegation must identify the intended Route 53 public hosted zone's nameservers, and that zone must contain the appropriate records. The EC2 service still needs a working network path, named-site configuration and TLS where required. I would verify all three responsibilities instead of assuming the account holding the registration also hosts the website.

A CNAME points www to the apex. Does it redirect the browser?

No. It provides DNS alias information used while resolving the requested name. The browser still requested the www URL unless a later application response redirects it. To choose a canonical address, configure and test the web redirect separately, including its status, Location value and destination content. Both the original name and destination need the appropriate service and certificate arrangement.

The new record appears in Route 53, but public users receive the old value. What do you check?

I first identify the delegated hosted zone and query its authoritative data. A same-named unused zone is a common source of confusion. If the authoritative answer is correct, I compare recursive responses, TTLs and the update timeline. I also verify the exact name and record type, including AAAA when relevant. I would not describe it as propagation delay before establishing where the old value originates.

Can two websites share one address?

Yes. The web endpoint can select named sites using the requested authority. For ordinary HTTPS, TLS configuration and SNI also matter before the protected HTTP request. The local lab demonstrates different HTTP bodies at one loopback endpoint for two names. A production design additionally needs the actual DNS, certificates, routing and application checks for each public name.

Why can a newly created name still look absent to one user?

The user's resolver may have cached an earlier negative answer, or the user may be querying a different DNS view. I would compare the authoritative response with the affected resolver's response and inspect the status and relevant caching information. A timeout is not the same as a negative DNS answer. The explanation should identify the observed response rather than treating every empty answer section as the same failure.

What does a successful curl request using resolve prove?

It proves the tested request reached the supplied address under the specified name-and-port override and produced the observed response. For HTTPS, normal certificate checks still matter. The override does not publish DNS or demonstrate that public resolvers return the same address. I would report it as endpoint validation and perform public resolution checks separately before declaring the named service ready.

Quiz: connect the symptom to the responsible layer

1. The registration is with GoDaddy, but public delegation points to Route 53. Where should the active website A record be maintained?

Reveal the answer and reasoning

In the intended authoritative Route 53 zone. Editing an inactive GoDaddy zone does not alter the delegated public answer. Confirm the nameserver set before deciding which same-named zone is active.

2. Both local names connect to 127.0.0.1:18889, but the bodies differ. Which value caused the teaching handler's choice?

Reveal the answer and reasoning

The requested Host value. The destination stayed fixed. This demonstrates application-level name selection and does not require changing any public DNS record.

3. An A record is correct, but some IPv6 clients fail. Which additional record and path should you investigate?

Reveal the answer and reasoning

Inspect the AAAA record and its IPv6 destination, listener and network path. An IPv4 success does not establish that the separate IPv6 path works.

4. A cached response had a one-hour TTL. Five minutes later, the operator lowers the authoritative TTL to one minute. Must the existing cache refresh immediately?

Reveal the answer and reasoning

No. The already cached response retains its previous lifetime under the ordinary model. Plan a lower TTL before a migration and allow older entries to expire.

5. A trusted certificate is valid for workshop.example.com, and register.example.com resolves to the same address. Is the second name automatically covered?

Reveal the answer and reasoning

No. Address equality does not establish certificate identity coverage. Check the certificate's actual identities and the TLS selection for register.example.com.

Revision cards

Three responsibilities

Registration maintains the name relationship. Authoritative DNS publishes records. Hosting serves content and application behavior. One company can provide several roles without making them the same role.

Delegation selects the zone

A zone displayed in a dashboard affects public resolution only through the correct delegation path. Match the nameserver set, especially when multiple zones have the same name.

Names and paths differ

DNS address lookups concern names. HTTP paths and query strings belong to the requested resource. An address record does not configure a page route.

TTL belongs to an answer

A later authoritative edit does not rewrite already cached answers. Include negative results and delegation information in a realistic change timeline.

Verify both address families

A and AAAA describe different address families. Publish only the intended supported destinations and investigate each path when client behavior differs.

Prove the complete request

Compare DNS, connection, TLS, requested site and expected content. A correct answer at one stage narrows the investigation; it does not automatically prove every later stage.

Official sources

Practice Tasks

Practice checks run in your browser. They check the answer for this exercise; they do not create resources or connect to your AWS account.

About this scenario

Lisboa Tiles is a ceramic tiles business in Lisbon. João Silva looks after its IT and cloud work. They count money in EUR and run their AWS resources in the eu-west-1 Region. In the tasks below you do real jobs for them using what this lesson teaches. All names, account IDs, IP addresses and numbers are made up for practice.

0 / 10

Easy List hosted zones

You need the zone ID to change records.

List all hosted zones in the account.

  1. Read the task and decide which AWS service it is about.
  2. Write aws, then the service name, then the operation (the action word).
  3. Add each needed flag (--name) followed by its value from the task.
  4. Flags can be in any order. Click Check answer.

Medium Create a hosted zone

A hosted zone holds DNS records for its zone. Public delegation selects the authoritative zone, and a delegated child can have its own zone.

Create a public hosted zone for lisboatiles.pt, with caller reference lisboatiles-2026-01.

  1. Read the task and decide which AWS service it is about.
  2. Write aws, then the service name, then the operation (the action word).
  3. Add each needed flag (--name) followed by its value from the task.
  4. Flags can be in any order. Click Check answer.

Medium List records in a zone

Check what A, CNAME and MX records exist before you change them.

List the record sets in hosted zone Z0123456789ABCDEFGHIJ.

  1. Read the task and decide which AWS service it is about.
  2. Write aws, then the service name, then the operation (the action word).
  3. Add each needed flag (--name) followed by its value from the task.
  4. Flags can be in any order. Click Check answer.

Medium Find the Amazon DNS address

This exercise uses the resolver address at the primary VPC IPv4 range plus two. AWS also documents link-local resolver addresses.

The VPC is 10.57.0.0/16. What is the Amazon-provided DNS server address?

  1. Write down the numbers the task gives you.
  2. Work it out step by step on paper.
  3. Type only the final answer in the box.
  4. Click Check answer.

Medium Attach the Elastic IP to the server

Associating gives the server the fixed public IP that your domain points to.

Associate allocation eipalloc-012b3b140dcdd44 with instance i-0cd041b3b21011a2b.

  1. Read the task and decide which AWS service it is about.
  2. Write aws, then the service name, then the operation (the action word).
  3. Add each needed flag (--name) followed by its value from the task.
  4. Flags can be in any order. Click Check answer.

Medium Look up a DNS record

dig shows what IP a name points to, so you can check DNS changes.

Look up the A record of www.lisboatiles.pt.

  1. Find the Linux command that does this job.
  2. Add the options (like -r or -h) the task needs.
  3. Add the file names, folders or users in the right order.
  4. Use sudo if the job changes system files or users. Click Check answer.

Medium Test the nginx config

A configuration test catches syntax and some setup errors. Verify the intended request behavior separately after applying a tested change.

Check the nginx configuration files for errors.

  1. Find the Linux command that does this job.
  2. Add the options (like -r or -h) the task needs.
  3. Add the file names, folders or users in the right order.
  4. Use sudo if the job changes system files or users. Click Check answer.

Hard Create or update a DNS record

UPSERT creates the record or updates it if it already exists.

Apply the record changes in change.json to hosted zone Z0123456789ABCDEFGHIJ.

  1. Read the task and decide which AWS service it is about.
  2. Write aws, then the service name, then the operation (the action word).
  3. Add each needed flag (--name) followed by its value from the task.
  4. Flags can be in any order. Click Check answer.

Hard Create a health check

This exercise creates a Route 53 health check. A failover design can use configured health checks or supported alias target-health evaluation according to its endpoint.

Create a health check with caller reference hc-lisboatiles-1 using the config in hc.json.

  1. Read the task and decide which AWS service it is about.
  2. Write aws, then the service name, then the operation (the action word).
  3. Add each needed flag (--name) followed by its value from the task.
  4. Flags can be in any order. Click Check answer.

Hard Enable an nginx site on Ubuntu

On Ubuntu, a site is enabled by a symbolic link from sites-available to sites-enabled.

Create a symbolic link to /etc/nginx/sites-available/lisboatiles inside /etc/nginx/sites-enabled/.

  1. Find the Linux command that does this job.
  2. Add the options (like -r or -h) the task needs.
  3. Add the file names, folders or users in the right order.
  4. Use sudo if the job changes system files or users. Click Check answer.