Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at

  • Pete 213 posts 285 karma points
    Jul 26, 2011 @ 20:57

    Localhost multiple sites

    Hi, i've inherited a umbraco project from a customer, and just trying to get my head round how it works.

    One issue i've found is it has 2 sites on the node tree, but when I view the site on localhost it shows the first site, I can't see any setting where you can set which site will show in localhost, only the domain settings for when it's live on the net.


  • Jan Skovgaard 11264 posts 23590 karma points MVP 8x admin c-trib
    Jul 27, 2011 @ 00:12
    Jan Skovgaard

    Hi Pete

    In the config folder on the filesystem you must open the umbracoSettings.config file and make sure that this line is set to true.


    And make sure you have set up the hostnames for each root node by right clicking the on each of them and select "Manage Hostnames" and enter the your local domain names in here.

    Then you should be able to access both sites - please be aware that you may need to recycle the app pool when you have made the changes in the umbracoSettings.config file.


  • Pete 213 posts 285 karma points
    Jul 27, 2011 @ 10:03

    Hi Jan

    Thanks for the reply.

    I followed your instructions but it could not find the local sites. I also added the http headers in IIS to match the local domains in "manage hostnames" but still no luck.

    I've created another site node also for testing stuff out on, so I now have.


    Reading some other forums I notice that people have http://sitename.local/ instead of localhost, not sure if that's an issue?

    I'm on windows 7 (6.1 service pack 1), IIS 7.5.7600, Umbraco v 4.6.1 (Assembly version: 1.0.4029.25836)



  • Rich Green 2246 posts 4008 karma points
    Jul 27, 2011 @ 10:11
    Rich Green

    If you're running the sites from your localhost you'll need to add the sites to your hosts file


  • Paul Blair 466 posts 731 karma points
    Jul 27, 2011 @ 22:44
    Paul Blair

    Edit your hosts file as indicated by Rich. It should look something like:    live.localhost    practice.localhost    dev.localhost

    Go to IIS and select the site you wish to apply the hostnames to. Select bindings and add a hostname for each of the above (e.g. 1st hostname value will be live.localhost)

    In Umbraco Content section right click each root node and add the hostname to the appropriate homepage.

  • Pete 213 posts 285 karma points
    Jul 28, 2011 @ 13:39

    That did it, many thanks all.

    I notice that I did not need this: <useDomainPrefixes>false</useDomainPrefixes> set to true for having multiple domains, but did when the sites were on the live domain using subdomains.


Please Sign in or register to post replies

Write your reply to: