Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Using windows servers, how would a SaaS web application allow for customers to use their own domains?

From what I have read, they would enter a CNAME record for example.com/myapp/ to redirect to my server.

Is there anything I would have to do on my end DNS/etc. wise? (My application will lookup the URL, and find their data obviously).

I am more converned with hardware/dns/routing settings etc.

share|improve this question
    
Hi Homestead, can you clarify a bit? You have a client, and the client wants their people to go to client.dom1/app and have them wind up at your domain? Or is it that they go to client.dom2 and end up at client.dom1? –  Matt Simmons Jun 2 '09 at 3:07
add comment

4 Answers

As Ivan States you would setup a CNAME for the domain you want to redirect to point to your server. You cannot re-direct using a path as, so you would just create a CName for example.com to point to myserver.com, then you can go to example.com/myapp if you wish.

To get IIS to handle this, you can do 1 of 2 things. If all requests will be going to the same place, not dependant on the URL, then you can just have one site that listens for all requests on port 80 (or 443 if its https), and your done.

If however each domain, will need a different site, then you can create multiple sites in IIS, set them to listen on port 80 or 443, but for a specific Host Header, that way that site will only respond to requests for that particualr URL.

share|improve this answer
1  
A caveat here is that Host Headers don't work for SSL. –  Brian May 18 '09 at 1:40
    
well they would have different urls, so would that be your solution 1 or 2? i.e. cnn.example.com fox.example.com –  user2659 Jun 20 '09 at 4:10
    
Ok, but do cnn.example.com and fox.example.com all end up at the same actual site, if they do use option 1, if they are separate sites, use option 2 –  Sam Jun 20 '09 at 8:40
add comment

The CNAME they would add is just the domain name, you cannot also use pathnames. And it wouldn't be a redirection per se, as your web server will respond directly to their domains.

On your end, you'd need to tell your web server to respond to that domain (or better yet, respond to any domain, and let it be handled by your app).

If you're using Apache, it's pretty easy, as by default it will respond with the default Virtual Host you have defined.

For IIS unfortunately I don't know how it would work.

share|improve this answer
add comment

Have the customer add an A Record for the IP addresses of your hosted application in their DNS zone. Then in IIS 7 Mananger, create a binding (host header / IP address pairing) for each domain host record they have assigned to your application. Example: myapp.mydomain.com, coolapp.anotherdomain.net, etc.

share|improve this answer
add comment

I think this is it - Create a subdirectory under your single instance SaaS web application called "sites". Within "sites" create a subdirectory for each website. So sites\clientX. In the clientX directories either put a default page or a web.config that creates all the settings required for that client website. Hook up an IIS website to clientx subdirectory, not the root. Then redirect back to the root. It's the redirect I am fuzzy about. We did this in classic asp. I am working on this right now with IIS7 and asp.net.

mkersey-at-soveryn.com - feel free to email, I would like to know how things go!

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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