1

We are creating a SAAS base application, where every company get its own subdomain. But if the company wants to configure another domain with our application, they can do that.

e.g. I am a company registered with the application www.saas.com, i got the subdomain company.saas.com, now i want to point my company.com domain to the company.saas.com, so how we can achieve this?

We want to create a custom domain configuration settings for the users of our application. Its like wordpress domain mapping (you can point your own domain to the wordpress site). So as i read related with wordpress they asked to add the CNAME of your site for the domain which you want to configure for mapping.

Our application is written in CakePHP.

Is there any server configuration changes we need to do to achieve this?

Vijay Kumbhar
  • 896
  • 1
  • 13
  • 31
  • DId you get it done ? if yes then please let me know how its done . I have the same kind of requirement – Vikram Jan 09 '18 at 11:11

1 Answers1

1

Put an CNAME record on the company.com pointing to the company.saas.com :)

andy
  • 2,369
  • 2
  • 31
  • 50
  • Dont we need to do any changes in our apache httpd.conf file? Now it goes to the /var/www/ directory, but i want to route it to the particular application. It is not going there – Vijay Kumbhar Aug 23 '12 at 11:26
  • Do you have access to the server for `company.saas.com`? – andy Aug 23 '12 at 11:49
  • Yes, its our own server. We can make changes to the server configurations, if needed. Please let me know if anything that we need to change in apache conf – Vijay Kumbhar Aug 23 '12 at 12:59
  • Well under whatever rule is dictating `company.saas.com` add a server alias for `company.com` – andy Aug 23 '12 at 13:10
  • But there can be n number of companies, i can not go and manually add the server aliases. :( – Vijay Kumbhar Aug 23 '12 at 17:14
  • The only other thing would be adding a server alias for `*` but I'm not sure how that would turn out. – andy Aug 24 '12 at 10:38
  • * will work for all the dynamic subdomains we are creating programmatically. But not for my case company.com to company.saas.com Hey thanks Andy for your help... – Vijay Kumbhar Aug 24 '12 at 13:13
  • Creating CNAME for root domain is not a good practice. Infact CNAME for root domain is not even in the specs of CNAME. They work well for subdomains. If you want to map subdomain.company.com to account.saas.com then use CNAME else you will need to create A record – Broncha Mar 31 '15 at 12:13