This project is read-only.

Multitenancy and Subdomains

Topics: Administration, Customizing Orchard, Installing Orchard
Aug 31, 2013 at 6:47 PM
Edited Aug 31, 2013 at 6:48 PM

I'm using Orchard 1.6.1.

Say my first site is called I tried to create a new tenant and put the as the Host with no URL prefix (seeing that it is Optional).

The url is shown and when I try to Set Up, it doesn't show anything. I tried to remove the subdomain and enter a prefix which resulted in It worked, however, I would very much prefer a subdomain as shown/detailed here:

Do I have to set it up in my DNS server?

Any piece of advise or information would be highly appreciated. Thanks!
Sep 1, 2013 at 2:08 AM
You certainly need the DNS to be properly set-up to point, but it's hard to say what went wrong otherwise, we would need more details. When you say "it doesn't show anything" for example, did you look at the network tab of your browser's tools to check if it was really nothing? Is IIS configured to accept requests to the new host name?
Sep 1, 2013 at 2:55 AM
It just tells me can't find server. No resources are loaded.

So I need to add a cname on my dns to point the subdomain ( to my domain ( And setup my site in IIS with the new binding ( I tried that and didn't get anything.

Or do I need to setup with a URL prefix and point the cname there?
Sep 1, 2013 at 3:01 AM
Also, in the tutorial ( to add a new Tenant, why does it look to easy to setup a new tenant with a subdomain? And he enters alpha.localhost but the result is alpha.myorchard?
Sep 1, 2013 at 6:54 AM
You need to setup the DNS, IIS, and Orchard. It is easy to set-up a tenant with a subdomain, but there's nothing that Orchard can do to help you properly set-up the DNS and web server.
Sep 1, 2013 at 8:14 AM
Firstly, thank you so much BLR for replying, it really means a lot. :)

So I added the subdomain as a cname and pointed it to the domain ( pointing to, is that all from the DNS side? As for the web server, do I just add the new subdomain in the bindings?
Sep 1, 2013 at 8:17 AM
That sounds about right.
Sep 1, 2013 at 8:35 AM
Tried that and didn't work :(

The last thing I can think of is just use the URL prefix and point a CNAME to the tenant. In essence:

cname: ->

I'll try it out, thanks!
Sep 1, 2013 at 9:41 AM
You definitely should not have to do that. You might want to verify every step of the way, using a static site, etc.
Sep 1, 2013 at 3:56 PM
Do I have to configure anything with IIS or the server itself? (url rewrite, etc)
Sep 1, 2013 at 8:39 PM
The new domain should be in the bindings as an accepted host name. On the Orchard side the tenant should be configured for the host name.
Sep 4, 2013 at 2:17 AM
  1. Create an empty IIS site with some static html file.
  2. Add both bindings to your site: and
  3. Set up DNS entries (whichever you prefer)
    • A entry for and CNAME -->, or
    • Two A entries for both subdomains
  4. Ensure that you can see your static html file when hitting both subdomains
  5. If yes, then copy your Orchard application in place of the static content
  6. Set RequestUrlHost in Settings.txt file for each tenant with the right subdomain URL ( and, respectively)
  7. iisreset
  8. Hit both subdomains and check if you see the correct content served
  9. If you don't - look at App_Data\Logs for any errors and troubleshoot.
That's basically the whole procedure.
Sep 4, 2013 at 2:24 AM
Edited Sep 4, 2013 at 2:26 AM
Oh and before you even start looking for a problem in your Orchard app, ping your subdomains to ensure they get resolved to correct server IP. DNS changes take time to propagate (especially if you're testing your app on public internet). This can even take days.

If you don't like to wait - you can always put the server IP --> subdomain mappings in %system32%\drivers\etc\hosts file.