2

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.

stukelly
  • 1,015
  • 13
  • 18
user2659
  • 1,152
  • 4
  • 20
  • 32
  • 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 02 '09 at 03:07

4 Answers4

3

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.

Sam Cogan
  • 38,158
  • 6
  • 77
  • 113
1

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.

Ivan
  • 3,172
  • 3
  • 24
  • 34
0

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!

0

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.

rmwetmore
  • 432
  • 1
  • 5
  • 10