NetTalk Central

NetTalk Web Server => Web Server - Share Knowledge => Topic started by: PaulMacFarlane on February 20, 2014, 10:13:52 AM

Title: Multi-company solution using HostHeader
Post by: PaulMacFarlane on February 20, 2014, 10:13:52 AM
In the Nettalk webinar #7 there was a discussion about how to handle multiple companies using the HostHeader property.

One part of the discussion was the adding of DNS entries to handle different companies.
Example:
C1.mysite.com
C2.mysite.com

You'd need to add CNAME entries C1, C2, etc.

You could get the HostHeader and distinguish between the "companies".  The downside is that you need to create A records in the DNS for each company..  or do you?

A better way is to use a DNS Wildcard....

What you can do is add a DNS A entry that says something like:
"*.app" and point it to the correct IP....
So, the User would type "C1.app.mysite.com" and be directed to that IP.
They could type "C2.app.mysite.com" and go to the same IP.

No matter what they type in the URL before ".app.mysite.com", DNS will send them to the correct place.

On your server you would then receive a HostHeader of "C1.app.mysite.com" or whatever they had typed.

1 DNS entry - unlimited "companies"

Title: Re: Multi-company solution using HostHeader
Post by: PaulMacFarlane on February 20, 2014, 10:39:09 AM
Additional Notes:

DNS entries "*.app" and "app" are DIFFERENT.
So, "app.mysite.com" can point to a different place.

In practice you may just point to the same place and when you validate the HostHeader you find it not a valid entry and redirect to a different site...

SSL - I believe - but haven't tested it yet, that a WildCard Certificate WILL work.

You MAY need a wildcard that says "*.app.mysite.com" instead of "*.mysite.com"
Title: Re: Multi-company solution using HostHeader
Post by: Bruce on February 20, 2014, 09:13:23 PM
Excellent post!