Negative Caching (NXDOMAIN)

Negative caching คือการจัดเก็บการตอบสนอง DNS เชิงลบ — ส่วนใหญ่เป็น NXDOMAIN ("โดเมนที่ไม่มีอยู่") และคำตอบ NODATA — โดย [[recursive-dns|recursive resolver]] ตามที่กำหนดใน RFC 2308 เมื่อ resolver ค้นหา domain ที่ไม่มีอยู่และได้รับการตอบสนอง NXDOMAIN จะแคชผลลบนี้ตามระยะเวลาที่ระบุในฟิลด์ minimum TTL ของ [[soa-record|SOA record]] เพื่อป้องกันการส่งคำถาม upstream ซ้ำๆ สำหรับชื่อที่ไม่มีอยู่เดิม Negative caching ลดภาระบน [[authoritative-dns|authoritative server]] ระหว่าง typo storm หรือ query flood ที่มุ่งเป้า TTL เชิงลบมักสั้นกว่า TTL ของ record เชิงบวก โดยทั่วไปตั้งไว้ที่ 60 ถึง 3600 วินาที

ตัวอย่าง

If a resolver queries for mispeld.example.com and receives NXDOMAIN, it caches that negative answer for the SOA minimum TTL (e.g., 300 seconds), returning the cached NXDOMAIN instantly to any client asking for the same name within that window.