<p>When using host headers to host multiple websites on the same IP address in IIS, is there any way of accessing that website from a browser running on the local machine?</p>

<p>This is normally required when a given web component only allows configuration from the local machine. It's also useful when things like ASP.Net's built in error handling isn't working and you can only view the error in the browser but don't want to allow remote users to see it. </p>

<p>This has baffled me for a while and everytime I come across it I end up giving up in frustration and reconfigure stuff so I can accomplish such tasks remotely.</p>

<p><strong>Added:</strong> @Ishmaeel - modifying hosts doesn't seem to help - you either get a 400 error (if all websites have host headers) or whichever site is configured without a host header.</p>

[{'answer_id': 36726, 'author': 'Ishmaeel', 'author_id': 227, 'author_profile': 'https://Stackoverflow.com/users/227', 'pm_score': 2, 'selected': False, 'text': "<p>Just an idea: Mapping the hostname to 127.0.0.1 in the hosts ($WINDOWS$\\system32\\drivers\\etc) file may help. This way you should be able to pull up the local IIS site by typing the hostname as if it's a remote server</p>\n"}, {'answer_id': 36728, 'author': 'Eugene Yokota', 'author_id': 3827, 'author_profile': 'https://Stackoverflow.com/users/3827', 'pm_score': 0, 'selected': False, 'text': '<p>Maybe I am not understanding the question, but what\'s wrong with just typing in the URL for the website? If it\'s the matter of domain name resolution, you can point to the right DNS or put it in <a href="http://en.wikipedia.org/wiki/Hosts_file" rel="nofollow noreferrer">hosts</a> file.</p>\n'}, {'answer_id': 360144, 'author': 'Community', 'author_id': -1, 'author_profile': 'https://Stackoverflow.com/users/-1', 'pm_score': 0, 'selected': False, 'text': "<p>eed3si9n -- if you are trying to access a url locally and you use host headers you cant just type in the url: for example you have 2 websites (website1.com website2.com) on 1 server using host headers.  the local ip of the web server is 192.168.1.50 --> if you type in 192.168.1.50 you will get a 'page cannot found'.  if you put in the url website1.com or website2.com you will be accessing the sites from the outside (not locally). </p>\n\n<p>so the problem is how to access the sites locally not from the outside -- for example i need this ability so that i can access locally as the test sites are only available locally.  not from the outside... </p>\n"}, {'answer_id': 35499622, 'author': 'Anders Bornholm', 'author_id': 1425531, 'author_profile': 'https://Stackoverflow.com/users/1425531', 'pm_score': 0, 'selected': False, 'text': '<p>You can try telnetting to the server.</p>\n\n<pre><code>$ telnet localhost 80\n</code></pre>\n\n<p>(type these lines manually)</p>\n\n<pre><code>GET / HTTP/1.1\nHost: www.example.com\n</code></pre>\n\n<p>(exchange www.example.com for the host name your server is mapped to)</p>\n'}, {'answer_id': 63324548, 'author': 'nihat sen', 'author_id': 14060864, 'author_profile': 'https://Stackoverflow.com/users/14060864', 'pm_score': 0, 'selected': False, 'text': '<p>I would assume the only way you can do this is assigning a custom port to the specific website you want to monitor and just access it as &quot;localhost:CustomPort&quot;.</p>\n'}]
['https://Stackoverflow.com/questions/36715', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1521/']