Select Page

Have you had it that when browsing to a website hosted within a domain on an IIS server, you get logged off immediately?   If you then use the IP address it works fine, and also using ‘localhost’ from the server works fine?   This could be caused by a hostname containing an underscore.

According to RFC1123, the underscore is not permissable as a hostname, unless it is the first character for DomainKeys and service records, which differentiates it from a hostname.   This is taken from Wikipedia:

…Systems such as DomainKeys and service records use the underscore as a means to assure that their special character is not confused with hostnames. For example, specifies a service pointer for an SCTP capable webserver host (www) in the domain…

If you set up an alternate DNS entry to point to your server without an underscore, you should be back on track.

Sean Harrison has written a knowledge base style article on this topic relating to Sharepoint, which inspired me to add my 2c here, you can find his article here.