Search code examples
iisdnshostname

IIS website with hostname doesn't work on local network


I have a website on IIS. I can access to the website with the ip address with any devices connected to the network. To increase the ease to access the website, I want to have a hostname on the website. On IIS, I have made changes on binding. And add the ip address on the file C:\Windows\System32\drivers\etc\hosts like that :

192.xxx.xxx.xxx     www.test.local

When I want access to the website, it is unreachable

Thank you for any help.


Solution

  • According to your description, you should set up a DNS server in your local network as Lex says.

    A DNS server is a computer server that contains a database of public IP addresses and their associated hostnames, and in most cases serves to resolve, or translate, those names to IP addresses as requested.

    After setting this, you could use your domain to access your web site.

    Notice: It will only work in your local network, not in public internet.

    More details about how to set up a DNS server and configure a DNS server, you could refer to below article: https://support.microsoft.com/en-us/help/814591/how-to-install-and-configure-dns-server-in-windows-server-2003