WSAELOOP 0X0000274E: DNS resolution loops in Windows
This means Windows can't resolve a hostname because of a DNS loop or broken hosts file. Fix the hosts file or DNS settings.
If you get the error WSAELOOP (0X0000274E) — Cannot translate name when trying to ping or connect to a server, here's what's happening: Windows found a loop in the name resolution chain. Usually between the hosts file and DNS servers, or inside the hosts file itself.
I've seen this on Windows 10 and 11 machines that had someone manually edit the hosts file and accidentally point a hostname back to itself, or had a misconfigured DNS server that returns a CNAME pointing back to the original name. The socket error code is 10043 (WSAELOOP).
The fix is almost always on your local machine. Let's go through the three most common causes, starting with the one that's easiest to fix.
1. Corrupted or malformed hosts file
This is the number one cause. Someone (maybe you, maybe software) added a line like 127.0.0.1 myserver.local and also has another line pointing myserver.local to a different IP, or worse, a CNAME loop. Open the hosts file and check.
Steps:
- Open Notepad as Administrator (right-click Notepad > Run as administrator).
- Go to
C:\Windows\System32\drivers\etc\hosts. - Look for any line that has your problem hostname. Common mistake:
127.0.0.1 serverAand also192.168.1.10 serverA. Windows will loop trying both. - Remove the duplicate or wrong line. Save the file.
- Flush DNS cache: open Command Prompt as admin and type
ipconfig /flushdns.
The reason this works: Windows checks the hosts file before querying DNS. If it finds two entries for the same name, it doesn't know which to trust — so it throws WSAELOOP. Also, if a line has # comment symbol missing, it breaks the whole file. Make sure you don't have trailing spaces without a proper IP.
2. DNS server returning a CNAME loop
Sometimes the problem isn't local — it's on your DNS server (like your router or a corporate DNS). If your hosts file is clean, test with nslookup.
Steps:
- Open Command Prompt.
- Type
nslookup yourhostname. Look at the output. If it shows a CNAME that points back to the same name (e.g.,serverA -> serverA.local -> serverA), that's a loop. - If you see a loop, your DNS admin needs to fix the zone. But you can bypass it temporarily: add a static entry in your hosts file using the correct IP (get that IP from
nslookupon a different machine). - Also check your DNS suffix search order. Open Network Connections, right-click your adapter, Properties, Internet Protocol Version 4 (TCP/IPv4), Properties, Advanced, DNS tab. If you have multiple suffixes that cause the same name to resolve to different things, remove the extra ones.
Why this happens: Windows tries each DNS suffix until it gets a match. If two suffixes return different IPs for the same hostname, and one of those IPs points back to the original hostname, you get a loop.
3. NetBIOS over TCP/IP loop in LMHOSTS
Less common but I've seen it on older networks using NetBIOS. Windows can also loop if LMHOSTS (the NetBIOS version of hosts file) has a circular entry.
Steps:
- Open Notepad as Admin.
- Go to
C:\Windows\System32\drivers\etc\lmhosts. - Check for any line like
serverA 0x0or similar. Remove duplicate or circular entries. - Disable NetBIOS if you don't need it: Network Connections > right-click adapter > Properties > IPv4 > Properties > Advanced > WINS tab > select Disable NetBIOS over TCP/IP.
- Reboot or run
nbtstat -Rto purge the NetBIOS name cache.
The reason disabling NetBIOS helps: if NetBIOS is enabled, Windows tries to resolve names via broadcasts and LMHOSTS before DNS. If LMHOSTS has a loop, the error pops before DNS even gets a chance.
Quick reference summary
| Cause | Where to check | Fix |
|---|---|---|
| Hosts file corruption | C:\Windows\System32\drivers\etc\hosts | Remove duplicate/wrong entries, flush DNS |
| DNS CNAME loop | nslookup output | Clean hosts file entry with correct IP, or fix DNS zone |
| NetBIOS/LMHOSTS loop | C:\Windows\System32\drivers\etc\lmhosts | Remove circular entries, disable NetBIOS |
One last thing: if none of these work, run netsh winsock reset as admin and reboot. That resets the Winsock catalog — sometimes a corrupted catalog can cause weird socket errors like this. But in 9 out of 10 cases, it's the hosts file. Check that first.
Was this solution helpful?