Goodbye editing host files for simple test websites

During development I often create test websites or pages to test new implementations or new frameworks. After creation the simple way to test the website is to add the site to the local IIS server and to assign a hostname to avoid remembering a specific port. This works great but you still have to add the hostname to your host file (c:\windows\system32\drivers\etc\hosts) and point it to the loopback address (

When I started to read the article Configuring your ASP.NET application for Microsoft OAuth account on the MSDN blog site one of the first items was to use a test domain. Without reading further I was already configuring IIS with a new custom host name for that specific site. After creating the site I read the item completely and discovered the service.

This neat little service pointed all domain names to And they used the wildcart ‘*’ so you can choose any name you want. With this service setting up a test site is as simple as configuring your site in IIS.

Configure IIS for

Open up IIS and create your site like you always do. Open up the bindings screen and add any hostname ending on







After clicking ok, you can simply browse to and your local website will appear.


Credits off course for Scott Forsyth and Imar Spaanjaars who came up with this idea.

More info on:


Be sure to read their remarks on SSL before trying to test a local SSL configured site.

1 thought on “Goodbye editing host files for simple test websites

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.