[{"data":1,"prerenderedAt":503},["ShallowReactive",2],{"blog-understanding-dns-record-types":3},{"id":4,"title":5,"body":6,"category":490,"date":491,"description":492,"extension":493,"meta":494,"navigation":495,"path":496,"readingTime":497,"seo":498,"stem":499,"tool":500,"updated":501,"__hash__":502},"blog\u002Fblog\u002Funderstanding-dns-record-types.md","Understanding DNS Record Types",{"type":7,"value":8,"toc":461},"minimark",[9,13,16,21,29,32,61,65,70,73,83,86,90,93,99,102,106,110,121,127,130,134,137,165,168,172,176,179,185,190,201,205,209,212,218,222,225,231,234,238,242,245,251,254,258,262,265,271,277,281,284,290,293,297,448,452],[10,11,12],"p",{},"DNS (Domain Name System) is the infrastructure that translates domain names into IP addresses and routes email, certificates, and services. Understanding DNS record types is essential for configuring domains, debugging connectivity, setting up email, and deploying web services.",[10,14,15],{},"This guide covers every DNS record type you are likely to encounter, with practical examples.",[17,18,20],"h2",{"id":19},"how-dns-works","How DNS Works",[10,22,23,24,28],{},"When you type ",[25,26,27],"code",{},"example.com"," in a browser, your computer sends a DNS query to a recursive resolver (like Cloudflare 1.1.1.1 or Google 8.8.8.8). The resolver walks the DNS hierarchy — root servers, TLD servers, authoritative servers — to find the answer, then caches it for the TTL (Time To Live) duration.",[10,30,31],{},"Each DNS record has four parts:",[33,34,35,43,49,55],"ul",{},[36,37,38,42],"li",{},[39,40,41],"strong",{},"Name"," — the domain or subdomain",[36,44,45,48],{},[39,46,47],{},"Type"," — what kind of record (A, MX, TXT, etc.)",[36,50,51,54],{},[39,52,53],{},"Value"," — the record data",[36,56,57,60],{},[39,58,59],{},"TTL"," — how long resolvers can cache the answer (in seconds)",[17,62,64],{"id":63},"address-records","Address Records",[66,67,69],"h3",{"id":68},"a-record-ipv4-address","A Record (IPv4 Address)",[10,71,72],{},"Maps a domain to an IPv4 address. This is the most fundamental record type.",[74,75,80],"pre",{"className":76,"code":78,"language":79},[77],"language-text","example.com.    300    IN    A    93.184.216.34\n","text",[25,81,78],{"__ignoreMap":82},"",[10,84,85],{},"Most domains have one or more A records. Multiple A records provide basic round-robin load balancing.",[66,87,89],{"id":88},"aaaa-record-ipv6-address","AAAA Record (IPv6 Address)",[10,91,92],{},"Maps a domain to an IPv6 address. The \"quad-A\" name comes from being four times the size of an A record (128 bits vs 32 bits).",[74,94,97],{"className":95,"code":96,"language":79},[77],"example.com.    300    IN    AAAA    2606:2800:220:1:248:1893:25c8:1946\n",[25,98,96],{"__ignoreMap":82},[10,100,101],{},"Publish both A and AAAA records for dual-stack connectivity.",[17,103,105],{"id":104},"mail-records","Mail Records",[66,107,109],{"id":108},"mx-record-mail-exchange","MX Record (Mail Exchange)",[10,111,112,113,116,117,120],{},"Directs email to the correct mail servers. Each MX record has a ",[39,114,115],{},"priority"," (lower = preferred) and a ",[39,118,119],{},"mail server hostname",".",[74,122,125],{"className":123,"code":124,"language":79},[77],"example.com.    3600    IN    MX    10 mail1.example.com.\nexample.com.    3600    IN    MX    20 mail2.example.com.\n",[25,126,124],{"__ignoreMap":82},[10,128,129],{},"Sending servers try the lowest priority first and fall back to higher priorities.",[66,131,133],{"id":132},"txt-record-for-spf-dkim-dmarc","TXT Record (for SPF, DKIM, DMARC)",[10,135,136],{},"TXT records store arbitrary text, but their primary modern use is email authentication:",[33,138,139,148,157],{},[36,140,141,144,145],{},[39,142,143],{},"SPF",": ",[25,146,147],{},"v=spf1 include:_spf.google.com -all",[36,149,150,153,154],{},[39,151,152],{},"DKIM",": Published at ",[25,155,156],{},"selector._domainkey.example.com",[36,158,159,153,162],{},[39,160,161],{},"DMARC",[25,163,164],{},"_dmarc.example.com",[10,166,167],{},"TXT records are also used for domain verification (Google, Let's Encrypt), DKIM keys, and other protocols.",[17,169,171],{"id":170},"aliasing-records","Aliasing Records",[66,173,175],{"id":174},"cname-record-canonical-name","CNAME Record (Canonical Name)",[10,177,178],{},"Creates an alias from one domain to another. The resolver follows the CNAME to find the actual address.",[74,180,183],{"className":181,"code":182,"language":79},[77],"www.example.com.    3600    IN    CNAME    example.com.\nblog.example.com.   3600    IN    CNAME    hosting.provider.com.\n",[25,184,182],{"__ignoreMap":82},[10,186,187],{},[39,188,189],{},"Important rules:",[33,191,192,195],{},[36,193,194],{},"A CNAME cannot coexist with other record types at the same name (no CNAME + MX at the same subdomain)",[36,196,197,198,200],{},"You cannot CNAME a zone apex (",[25,199,27],{}," without a subdomain) in standard DNS — some providers offer workarounds (ALIAS, ANAME, CNAME flattening)",[17,202,204],{"id":203},"delegation-records","Delegation Records",[66,206,208],{"id":207},"ns-record-name-server","NS Record (Name Server)",[10,210,211],{},"Delegates a domain or subdomain to specific name servers. Every domain has NS records pointing to its authoritative DNS servers.",[74,213,216],{"className":214,"code":215,"language":79},[77],"example.com.    86400    IN    NS    ns1.dnshost.com.\nexample.com.    86400    IN    NS    ns2.dnshost.com.\n",[25,217,215],{"__ignoreMap":82},[66,219,221],{"id":220},"soa-record-start-of-authority","SOA Record (Start of Authority)",[10,223,224],{},"Contains administrative metadata about the zone: the primary name server, contact email, serial number, and refresh\u002Fretry\u002Fexpire timers.",[74,226,229],{"className":227,"code":228,"language":79},[77],"example.com.    3600    IN    SOA    ns1.dnshost.com. admin.example.com. 2024010101 3600 900 604800 86400\n",[25,230,228],{"__ignoreMap":82},[10,232,233],{},"Every DNS zone has exactly one SOA record.",[17,235,237],{"id":236},"security-records","Security Records",[66,239,241],{"id":240},"caa-record-certificate-authority-authorization","CAA Record (Certificate Authority Authorization)",[10,243,244],{},"Specifies which certificate authorities (CAs) are allowed to issue TLS certificates for your domain.",[74,246,249],{"className":247,"code":248,"language":79},[77],"example.com.    3600    IN    CAA    0 issue \"letsencrypt.org\"\nexample.com.    3600    IN    CAA    0 issuewild \"letsencrypt.org\"\nexample.com.    3600    IN    CAA    0 iodef \"mailto:security@example.com\"\n",[25,250,248],{"__ignoreMap":82},[10,252,253],{},"If no CAA record exists, any CA can issue a certificate. Publishing CAA records prevents unauthorized certificate issuance.",[17,255,257],{"id":256},"service-records","Service Records",[66,259,261],{"id":260},"srv-record-service-locator","SRV Record (Service Locator)",[10,263,264],{},"Specifies the host and port for a service. Used by SIP, XMPP, LDAP, and other protocols.",[74,266,269],{"className":267,"code":268,"language":79},[77],"_sip._tcp.example.com.    3600    IN    SRV    10 60 5060 sip.example.com.\n",[25,270,268],{"__ignoreMap":82},[10,272,273,274],{},"Format: ",[25,275,276],{},"priority weight port target",[66,278,280],{"id":279},"ptr-record-pointer-reverse-dns","PTR Record (Pointer \u002F Reverse DNS)",[10,282,283],{},"Maps an IP address back to a domain name. Used for reverse DNS lookups and email server verification.",[74,285,288],{"className":286,"code":287,"language":79},[77],"34.216.184.93.in-addr.arpa.    3600    IN    PTR    example.com.\n",[25,289,287],{"__ignoreMap":82},[10,291,292],{},"Many mail servers reject email from IPs without valid PTR records.",[17,294,296],{"id":295},"quick-reference-table","Quick Reference Table",[298,299,300,315],"table",{},[301,302,303],"thead",{},[304,305,306,309,312],"tr",{},[307,308,47],"th",{},[307,310,311],{},"Purpose",[307,313,314],{},"Example value",[316,317,318,332,345,358,371,384,397,410,423,436],"tbody",{},[304,319,320,324,327],{},[321,322,323],"td",{},"A",[321,325,326],{},"IPv4 address",[321,328,329],{},[25,330,331],{},"93.184.216.34",[304,333,334,337,340],{},[321,335,336],{},"AAAA",[321,338,339],{},"IPv6 address",[321,341,342],{},[25,343,344],{},"2606:2800:220:1:...",[304,346,347,350,353],{},[321,348,349],{},"MX",[321,351,352],{},"Mail server",[321,354,355],{},[25,356,357],{},"10 mail.example.com.",[304,359,360,363,366],{},[321,361,362],{},"CNAME",[321,364,365],{},"Alias to another name",[321,367,368],{},[25,369,370],{},"example.com.",[304,372,373,376,379],{},[321,374,375],{},"TXT",[321,377,378],{},"Text (SPF, DKIM, verification)",[321,380,381],{},[25,382,383],{},"v=spf1 include:...",[304,385,386,389,392],{},[321,387,388],{},"NS",[321,390,391],{},"Name server delegation",[321,393,394],{},[25,395,396],{},"ns1.dnshost.com.",[304,398,399,402,405],{},[321,400,401],{},"SOA",[321,403,404],{},"Zone authority metadata",[321,406,407],{},[25,408,409],{},"ns1. admin. serial ...",[304,411,412,415,418],{},[321,413,414],{},"CAA",[321,416,417],{},"Certificate authority control",[321,419,420],{},[25,421,422],{},"0 issue \"letsencrypt.org\"",[304,424,425,428,431],{},[321,426,427],{},"SRV",[321,429,430],{},"Service host and port",[321,432,433],{},[25,434,435],{},"10 60 5060 sip.example.com.",[304,437,438,441,444],{},[321,439,440],{},"PTR",[321,442,443],{},"Reverse DNS",[321,445,446],{},[25,447,370],{},[17,449,451],{"id":450},"try-it","Try It",[10,453,454,455,460],{},"Look up any DNS record type for any domain with ",[456,457,459],"a",{"href":458},"\u002Ftools\u002Fdns-lookup","StackCache DNS Lookup",". It queries via DNS-over-HTTPS (Cloudflare) and displays results with TTL, DNSSEC status, and full answer details — all from your browser.",{"title":82,"searchDepth":462,"depth":462,"links":463},2,[464,465,470,474,477,481,484,488,489],{"id":19,"depth":462,"text":20},{"id":63,"depth":462,"text":64,"children":466},[467,469],{"id":68,"depth":468,"text":69},3,{"id":88,"depth":468,"text":89},{"id":104,"depth":462,"text":105,"children":471},[472,473],{"id":108,"depth":468,"text":109},{"id":132,"depth":468,"text":133},{"id":170,"depth":462,"text":171,"children":475},[476],{"id":174,"depth":468,"text":175},{"id":203,"depth":462,"text":204,"children":478},[479,480],{"id":207,"depth":468,"text":208},{"id":220,"depth":468,"text":221},{"id":236,"depth":462,"text":237,"children":482},[483],{"id":240,"depth":468,"text":241},{"id":256,"depth":462,"text":257,"children":485},[486,487],{"id":260,"depth":468,"text":261},{"id":279,"depth":468,"text":280},{"id":295,"depth":462,"text":296},{"id":450,"depth":462,"text":451},"Networking","2026-09-08","A complete guide to DNS record types: A, AAAA, MX, CNAME, TXT, NS, SOA, CAA, PTR, and SRV. Learn what each record does and when to use it.","md",{},true,"\u002Fblog\u002Funderstanding-dns-record-types",9,{"title":5,"description":492},"blog\u002Funderstanding-dns-record-types","dns-lookup",null,"2Er1WidpWnthaXzunjsCzWNqHYPMTf9uNSiQjrfzjLI",1788868139372]