1

i am running a local python server on windows 10 and sending requests to it via the localhost domain are significantly slower than using 127.0.0.1. i have edited my hosts file and the problem occurs whether i have 127.0.0.1 localhost commented out or not (including ipv6 entry). if i use any other domain with an entry in my hosts file pointing to 127.0.0.1 then the problem goes away which proves that the hosts file is working correctly for all custom entries. i have tried flushing dns and various other commands to clear out any DNS caching to no avail.

even though localhost is defined in my functioning hosts file something is specifically hijacking the domain resolution and causing it to respond much slower than it should.

i realize there have been a number of posts about this issue but they all simply suggest using 127.0.0.1 instead which does not solve the problem or explain why it is happening.

jpro
  • 133
  • 1
  • 3
  • You may take a look at https://superuser.com/questions/436574/ipv4-vs-ipv6-priority-in-windows-7/436944#436944, which solves my problem perfectly. – Keith Null Apr 19 '21 at 13:51

0 Answers0