Why can not we create a site using the iis set the hostname

CPU name

Host name is the site's domain name, popular saying is that Web site address (such as: www.baidu.com).
Set the host name, IIS does not know where the host name corresponding to the address.
For example, as the host name www.baidu.com IIS Web site that is accessed by Baidu it? IIS Web site or the content of it? This involves the interpretation of the domain name.

Domain name explained

The domain explained steps: first find local C: \ Windows \ System32 \ drivers \ etc hosts file have not done the domain record, if any, return;
if not, into the domain network lookup DNS explain; if still not, continue DNS lookup record to the external network.
We usually locally tower construction site, with access to localhost is because the C: \ Windows \ System32 \ drivers \ etc hosts file to do the record, if you need to set the local host name (domain name), it is necessary to modify the hosts file.
So, enter in the browser, domain name, browser check C: \ Windows \ System32 \ drivers \ etc hosts file has no corresponding host, if there is, again read the local IIS configuration; if the hosts file which does not correspond host that the browser will look up the address to the Internet.

Reference material

https://zhidao.baidu.com/usercenter?uid=c6084069236f25705e79de02

Guess you like

Origin www.cnblogs.com/azeLibertas/p/11470604.html