This is because NAT is loopback, you can try to use the internal ip if you are accessing a hosted server. if you want to access using your hostname, be sure to include it inside the "hosts" file.
C: \ Windows \ System32 \ Drivers \ Etc \ hosts
add this line
127.0.0.1 subdomain.xyz.com
so basically what the hosts file does, it actually points to your localhost every time you enter subdomain.xyz.com into your browser.
Tengku fathullah
source share