0X00002AFC

Fix WSANO_DATA (0X00002AFC) DNS Error on Windows

Network & Connectivity Intermediate 👁 8 views 📅 Jun 30, 2026

This error means DNS found the hostname but no record of the type you asked for. Happens when DNS has an A record but you're asking for an MX or vice versa.

You run nslookup or some DNS query and get back WSANO_DATA (0X00002AFC) with the message “The requested name is valid, but no data of the requested type was found.” This usually happens when you query for an MX record but only an A record exists, or vice versa. I see this most often on Windows 10 and 11 when someone tries nslookup -type=MX example.com and the domain only has an A record. Or when a Python script calls socket.getaddrinfo() with AF_INET6 but the host has no AAAA record.

What’s Actually Happening Here

DNS knows the hostname exists — it’s in the zone. But the specific record type you asked for isn’t there. The server responds with NOERROR + empty answer section, and Windows translates that to this error code. It’s not a failure to find the name. It’s a mismatch between what you asked and what exists.

The real cause is usually one of three things:

  • Wrong query type — you asked for MX, TXT, or AAAA but only an A record lives there.
  • Stale DNS cache — your local resolver cached an old record type.
  • Misconfigured DNS server — the upstream server has incomplete zone data.

Step-by-Step Fix

Step 1: Check the Record Type You’re Asking For

Run this command to see what record types exist for that hostname:

nslookup -type=ANY example.com

If that returns non-existent domain, the hostname doesn't exist at all. But if it returns an empty answer or just an A record, you know the problem is type mismatch. For example, you can’t get an MX record from a host that only has an A record.

Step 2: Flush Your Local DNS Cache

Open Command Prompt as admin and run:

ipconfig /flushdns

Why this works: Windows caches negative responses for record types too. If you previously asked for an MX record and got WSANO_DATA, it remembers that and keeps giving you the same error. Flushing clears that cached “no data” result.

Step 3: Check Your Application’s Query

If you’re writing code or using a tool, look at the query parameters. In Python, socket.getaddrinfo(host, port, family=socket.AF_INET6) will fail with this error if the host has no AAAA record. Switch to AF_UNSPEC or AF_INET for IPv4:

import socket
try:
    info = socket.getaddrinfo("example.com", 80, socket.AF_INET)
except socket.gaierror as e:
    print(f"Error: {e}")  # might be WSANO_DATA

Step 4: Test Using a Different DNS Server

Sometimes your company’s DNS server has stale data. Try Google’s public DNS:

nslookup example.com 8.8.8.8

If that returns the correct record, your DNS server is the problem. Talk to your network admin or temporarily set your adapter to use 8.8.8.8 and 1.1.1.1.

Step 5: Check for Split-Brain DNS

If this happens only inside your office network but works outside, you might have split-brain DNS — internal and external DNS zones that differ. For example, internal DNS has an A record for a server but no MX record, while external DNS has both. The fix is to update your internal DNS zone to include the missing record type.

If It Still Fails

  • Verify the hostname exists — use ping -a hostname to see if it resolves at all. If ping fails with “Ping request could not find host”, you’ve got a different problem.
  • Check your hosts fileC:\Windows\System32\drivers\etc\hosts. An entry there can override DNS and cause weird mismatches.
  • Disable IPv6 temporarily — go to Network Settings > Change adapter options > Right-click your adapter > Properties > Uncheck “Internet Protocol Version 6 (TCP/IPv6)”. Reboot and test. Some VPNs or corporate networks have broken IPv6 DNS.
  • Reset Winsock — run netsh winsock reset in admin cmd, then reboot. This fixes corrupted network stacks that mangle DNS responses.

The core insight: WSANO_DATA isn’t a broken DNS — it’s a type mismatch. Most of the time, you just asked for the wrong record type, or your cache remembered an old incomplete answer. Know what record type your application needs, and you’ll avoid this error entirely.

Was this solution helpful?