I'm using Windows 10. I'm trying to map 127.0.0.1 to a hypothetical domain: en.mylocalhost.tld
When I opened C:\Windows\System32\drivers\etc\hosts as Administrator, it was empty.
I added following line to it:
127.0.0.1 en.mylocalhost.tld
Restarted the PC.
I have an Angular application which is served on localhost:4200. It works on localhost.
But when I enter en.mylocalhost.tld:4200, I get
DNS error (the host name of the page you are looking for does not exist)
Also, there is no entry for localhost in the hosts file. Then why is localhost working?
How can I solve this?