Chapter 9: Domain Names, DNS and Subdomains
9.3 DNS record types you must know
Friends, a DNS record is a small rule – this name, this type, this value. A, CNAME and TXT are used every day; for the rest, being able to recognise them is enough.
मित्रांनो, DNS रेकॉर्ड म्हणजे एक छोटा नियम – हे नाव, हा टाइप, ही व्हॅल्यू. रोज A, CNAME आणि TXT वापरले जातात; बाकी रेकॉर्ड्स ओळखता आले तरी पुरेसे.
दोस्तों, DNS रिकॉर्ड मतलब एक छोटा नियम – ये नाम, ये टाइप, ये वैल्यू. रोज़ A, CNAME और TXT इस्तेमाल होते हैं; बाकी रिकॉर्ड्स पहचान लो तो काफ़ी है.
| Record | Purpose | Example (name → value) |
|---|---|---|
| A | Name → IPv4 address | @ → 13.233.10.25 |
| 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.
Ravindra Bagale's Tip
The day before you move a server, set the TTL to 300 – I do this in every migration. Then the change shows up quickly, and once things are stable, set the TTL back to 3600. And remember: never a CNAME at the apex @ – use an A record or a Route 53 Alias there.
Ravindra Bagale's Tip – मराठी
Server बदलण्याच्या आदल्या दिवशी TTL 300 करा – हे मी प्रत्येक migration मध्ये करतो. मग बदल लगेच दिसतो, आणि काम स्थिर झाल्यावर TTL परत 3600 करा. आणि लक्षात ठेवा: apex @ वर CNAME कधीच नाही – तिथे A record किंवा Route 53 Alias.
Ravindra Bagale's Tip – हिंदी
Server बदलने से एक दिन पहले TTL 300 करो – ये मैं हर migration में करता हूँ. फिर बदलाव जल्दी दिखता है, और काम स्थिर होने पर TTL वापस 3600 करो. और याद रखो: apex @ पर CNAME कभी नहीं – वहाँ A record या Route 53 Alias.
Lab
Chala, dig example.com don vela, kahi second antarane chalva aani ANSWER SECTION madhla TTL kami hot jato ka te bagha. Mag dig MX example.com +short aani dig NS example.com +short chalvun konte records distat te liha.