23 BADCOOKIE
Bad or missing server cookie. The DNS COOKIE option in the request is absent, malformed, or does not match the server's expected value.
On this page
When You See This Code
Your resolver sent a query without a valid server cookie, or the cookie has expired. This is part of the DNS COOKIE mechanism to prevent spoofed-source attacks.
How to Fix
Retry the query — most resolvers automatically learn the correct server cookie from the first response. If the error persists, ensure your resolver supports RFC 7873 DNS Cookies.
Specification
Compare With
Guides
Glossary
Frequently Asked Questions
What is DNS 23 BADCOOKIE?
Bad or missing server cookie. The DNS COOKIE option in the request is absent, malformed, or does not match the server's expected value.
When do you see DNS 23 BADCOOKIE?
Your resolver sent a query without a valid server cookie, or the cookie has expired. This is part of the DNS COOKIE mechanism to prevent spoofed-source attacks.
How to fix DNS 23 BADCOOKIE?
Retry the query — most resolvers automatically learn the correct server cookie from the first response. If the error persists, ensure your resolver supports RFC 7873 DNS Cookies.