When I pull up http://localhost in a web browser on my computer (Windows 7, IIS 7.5) I get the IIS 7 welcome image. I have a different website that is set up in IIS that I'd prefer to be the default web site. Can I change that setting somewhere in IIS?

UPDATE: Apparently I have my terminology wrong. What I have is one website (my "Default Web Site") with several applications under it. I have one application that I want to show up when I go to http://localhost instead of the IIS7 welcome image.

I have tried adding a redirect to the default HTML file in C:\inetpub\wwwroot, but that doesn't properly redirect requests for things like scripts and images, though it does redirect the browser.

3 Answers 3


If you just want a single web site and need to change the folder path for that site then edit the basic settings on the site, changing the physical path to the folder of the other site.

If you mean you've already added a completely new web site in IIS then you need to edit the bindings in your sites.

For web, you'll want to edit the http bindings on both the site labeled Default Web Site and your other desired site. Right-click on the site and choose Edit Bindings... or select the site and click on Bindings... in the Actions pane.

The quickest way is to delete the site labeled Default Web Site, but that might not be the desired thing.

The next quickest way is to change the bindings on the Default Web Site to a different port other than 80. Then set the port on your desired site to 80 and leave the Host Name field blank in the http bindings.

If you want to have both sites running and bound to port 80 then in the bindings on the Default Web Site, put something in the Host name box in the http binding. Leave this empty on your desired site. Keep both on port 80 (or change the default web site to another port). This should now make it so that your desired site is used when someone uses http://localhost or a URL with the hostname of your server.

From your edit - yes, your terminology was a bit off :)

In order to set an app up as the default so that when someone hits the root of your site the app shows up you will have to set up a redirect of some flavor.

Here are a couple of ways to do this:

  • Add an HTTP Redirect to the root level of your web site. Click Default Web Site in the navigation tree and then HTTP Redirect. You'll need to decide for yourself how to configure the redirect based on your needs for the app. This could have lingering effects if you decide to undo this in the future depending on what Status code you set.
  • Add a default page at the root of your web site with a redirect in it (via whatever programming platform you want - HTHML/JavaScript, ASP[.NET], etc). This is probably easiest and quickest and will not necessarily have a lingering affect.
  • I think my terminology was wrong. See my edit. Jul 25, 2012 at 19:14
  • @Mr. Jefferson Yep! No problem, see my edit.
    – squillman
    Jul 25, 2012 at 19:31
  • Your second option seems to be what is suggested here, and I tried it but it doesn't work for non-HTML resource requests (scripts, images, etc) Jul 25, 2012 at 19:35
  • Can you clarify your first option? I don't see an option for HTTP Redirect anywhere under Default Web Site. Jul 25, 2012 at 19:37
  • 2
    Ah, I know what's going on. You have to have installed the feature. Go to Control Panel | Programs and Features | Turn Windows Features on or off then under IIS -> WWW Services -> Common HTTP Features you need to select HTTP Redirection.
    – squillman
    Jul 25, 2012 at 19:51

Turns out you can edit the physical path of the Default Web Site (right click, Manage Web Site, Advanced Settings). Change that to the physical path of the app you want to be default, make sure other settings match (in my case the App Pool had to be changed), and there you go.

  • Change what to what?
    – Richard
    Sep 18, 2015 at 9:18

I found to resolve the issue of looping redirect bug the fix for the root site web.config is:

<?xml version="1.0" encoding="UTF-8"?>
        <httpRedirect enabled="true" destination="/ApplicationToRedirectTo/" exactDestination="false" childOnly="true" httpResponseStatus="Permanent" />

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.