How do I use folders to define websites?

Posted on 2011-05-07
Last Modified: 2013-11-30
I want to host several websites on my local machine. So I have created multiple folders under wwwroot for each site. For example:

Now when I hit the url I get the index.html under wwwroot not under wwwroot/site1. How do I do that? Or am I on he wrong track here.
Question by:sclarkny
    LVL 12

    Expert Comment

    I'm assuming you are using IIS as the web server. If so, open the Internet Information Services Manager, expand "Sites", and create a new site. Then point it at each of those folders.

    See: (IIS 6) (IIS 7)
    LVL 15

    Expert Comment

    by:Jagadishwor Dulal
    That is correct the web should not show you the root directory. As you mention it is correct wwwroot/site1 is why you need wwwroot there it have been managed by domain name which look for the root folder and your root is site1 so it retrieve file index.html and show to your user. Similarly second site is and others.

    Author Comment


    how do I do this using Win 7 Pro?
    LVL 12

    Accepted Solution

    Can you please confirm you are running IIS 7? If so:

    1) Open IIS Manager (see:
    2) Right-click on "Sites" and choose "Add New Site"
    3) Enter a name for the website.
    4) You can use the default Application Pool (unless you have a need to use another one or create a new one)
    5) Choose the folder for site1 when prompted for the Physical path
    6) You can use "All unassigned" for the IP Address
    7) I would suggest either using port 80 and a different host header for each site. Enter the domain name as the Host Header. For example, "" for site1. NOTE: Your DNS will have to point to your computer's IP. Alternatively, you can set this in your hosts file on your PC (but the website will only work on your PC).
    8) Choose Start Web site immediately
    9) Repeat for site2

    Author Comment

    I am running IIS7
    LVL 12

    Expert Comment

    The instructions above should work fine, then. So should the second link in my earlier posting. Let us know how it works out.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Envision that you are chipping away at another e-business site with a team of pundit developers and designers. Everything seems, by all accounts, to be going easily.
    If you're not part of the solution, you're part of the problem.   Tips on how to secure IoT devices, even the dumbest ones, so they can't be used as part of a DDoS botnet.  Use PRTG Network Monitor as one of the building blocks, to detect unusual…
    This video teaches users how to migrate an existing Wordpress website to a new domain.
    Any person in technology especially those working for big companies should at least know about the basics of web accessibility. Believe it or not there are even laws in place that require businesses to provide such means for the disabled and aging p…

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    13 Experts available now in Live!

    Get 1:1 Help Now