-3

Given the latest version of IIS at the time of writing is IIS8, how would one go about adding a new site through the IIS manager, set up HTTP bindings, and test the setup in a browser?

This configuration assumes that the named domain in the HTTP binding "does not exist" on the internet, but is simply a local moniker for testing (such as test.com and www.test.com.)

For a little background, I have followed the tutorial on pluralsight as well as I can for the IIS 7.5 version of this very task, but upon attempting to access test.com in my browser, I get a time out. Localhost however does work.

HopelessN00b
  • 53,385
  • 32
  • 133
  • 208
Firoso
  • 95
  • 1
  • If your objective is to test the site then what does it matter if you test it via localhost or test.com? You're testing the site, not DNS. – joeqwerty Feb 12 '13 at 02:14
  • @joeqwerty - there are things that you need accurate DNS resolution to test on a website; for example redirecting to a canonical domain, or serving different content for different domains, or even I18N - en.example.com, br.example.com, es.example.com, etc – Mark Henderson Feb 12 '13 at 08:28
  • Mark - True. I considered that but as the OP didn't provide a lot of detail about the nature of the testing I didn't elaborate. As it is, if I want to test a web site I can certainly do that with localhost. If I need the kind of testing that you elaborated on then DNS resolution is certainly needed. – joeqwerty Feb 12 '13 at 13:54
  • I think the key here was "Test the HTTP Bindings" that for some reason I only placed in the title, and not in the actual body of the question. – Firoso Feb 12 '13 at 17:58

1 Answers1

2

We have no idea what the "tutorial on pluralsight" is, but the quickest and dirtiest way to achieve this is to edit your hosts file.

On any modern version of Windows, this is at %WINDIR%\System32\drivers\etc\hosts

Add a new line to the end of the file that reads:

127.0.0.1 example.com

(where example.com is whatever you're trying to test).

You will probably need to run Notepad as Administrator to edit the file.

Mark Henderson
  • 68,316
  • 31
  • 175
  • 255
  • I actually did this very thing, 127.0.0.1 test.com exists as a single line, space delimited, in my hosts file. – Firoso Feb 12 '13 at 17:53