This depends entirely on how your application performs the hostname detection. E.g. if it runs on HTTPS, you'll need to add a virtual host on your web server. We could deduce, based on that you currently use subdomain.saas.example.com
and the software is able to detect that, that this should be possible. You'll just use the same method for hostname identification than with the current solution.
On DNS level you should use an A
record pointing to the same IP address. That's because using a CNAME
record only causes another DNS lookup for the company.saas.example.com IN A
record and it doesn't cause any change in the hostname detected, so you wouldn't get any benefit from using it; i.e. it's not a shortcut for preventing configuration of this hostname detection method.
If you wish to use CNAME
(for example if the IP address for *.saas.example.com
may change without acknowledging the customer), you should advice using a subdomain, e.g. saas.example.net
instead of example.net
. This is because when using a CNAME
record you are not able to use any other records on the same hostname. With the domain name itself this means you lose the ability to add MX
, TXT
, NS
etc. records. That would prevent using the same domain for email etc.