12. Domains and DNS: GoDaddy, Elastic IP, A/CNAME and Subdomains
12.1 DNS Records You Must Know
Part 1 madhe DNS che basics baghitle. Aata domain chya drushtine – registrar kon, DNS kon chalavto, aani website kuthe chalte – he teen vegle aahet.
DNS record types you must know
| Record | Purpose | Example (name → value) |
|---|---|---|
| A | Name → IPv4 address | @ → 203.0.113.10 |
| AAAA | Name → IPv6 address | @ → 2406:da1a:... |
| CNAME | Name → another name (alias) | www → example.com |
| MX | Mail servers for the domain (with priority) | @ → 10 mail.example.com |
| TXT | Free text, used for verification, SPF, DKIM | @ → "v=spf1 include:_spf.google.com ~all" |
| NS | Which name servers are authoritative | @ → ns51.domaincontrol.com |
| SOA | Start of authority: zone admin info and serials | created automatically |
| CAA | Which certificate authorities may issue certificates | @ → 0 issue "letsencrypt.org" |
| Alias (Route 53) | Like a CNAME but allowed at the apex, for AWS resources | @ → load balancer / CloudFront |
CNAME rules
A CNAME cannot be used at the apex (@), and a name with a CNAME can't have any other record. For the root domain always use an A record (or a Route 53 Alias). Use CNAME for names like www.
TTL and "propagation"
TTL (Time To Live) is how many seconds resolvers may cache a record. With TTL 3600, a resolver that looked up your old IP may keep using it for up to one hour after you change it. That delay is what people call DNS propagation. Nothing is actually pushed around the world; old cached answers simply expire.
- Before a planned change (e.g. moving to a new server), lower the TTL to
300(5 minutes) a day earlier. - After the change is stable, raise it again (e.g.
3600) to reduce lookups. - A new domain's name server change at the registrar can take longer, sometimes a few hours, because TLD servers and resolvers cache NS records with long TTLs.
Why this matters for security
DNS records are public – anyone can query them. Attackers read TXT records for SPF/DMARC gaps (email spoofing), enumerate subdomains for forgotten test servers, and look for "dangling" CNAMEs that point to deleted cloud resources (subdomain takeover). Clean, minimal DNS is part of your attack surface management.
Ravindra Bagale's Tip
The registrar (where you bought the domain), the DNS host (which answers for the records) and the server (EC2) are three different things. Many students look for "EC2 settings" in GoDaddy! Keep this picture clear in your head, and DNS will feel very simple.
Ravindra Bagale's Tip – मराठी
Registrar (जिथून domain विकत घेतला), DNS host (जो records चं उत्तर देतो) आणि server (EC2) – हे तीन वेगळे आहेत. बरेच students GoDaddy मध्ये "EC2 settings" शोधतात! हे चित्र डोक्यात स्पष्ट ठेवा, मग DNS एकदम simple वाटेल.
Ravindra Bagale's Tip – हिंदी
Registrar (जहाँ से domain ख़रीदा), DNS host (जो records का जवाब देता है) और server (EC2) – ये तीन अलग चीज़ें हैं. बहुत से students GoDaddy में "EC2 settings" ढूँढते हैं! यह तस्वीर दिमाग़ में साफ़ रखो, फिर DNS बहुत आसान लगेगा.
Practice task
For any public domain, look up its A, AAAA, MX, TXT and NS records with dig and write what each record tells you.