We create custom web apps for businesses and for the first time a client of ours has asked that instead of using our subdomain and instead of using a custom domain for their web app they would like to use their own subdomain for a domain currently hosted on another server.
For instance our domain is webapp.com
and their domain is business.com
. They would like app.business.com
to be point to our name servers so we can continue hosting the web app for them.
I know it’s possible to do this because we currently have outgoing CNAMEs on our server for help desks, etc, that aren’t hosted on our own server but are using subdomains of ours.
Could you help me with what our client has to do on their zone editing side and what we need to do on our WHM/cPanel side to allow this?
NOTE: We had the client create a CNAME for app.business.com.
pointed to our nameserver ns1.webapp.com
and then we created an add-on domain for business.com and subdomain for app.business.com but when you try to visit app.business.com it gets the “Sorry!” cPanel page.
Thank you!
2
Answers
Alright I figured out how to do it on my own after a lot of testing & thought I'd post here to help others out in case they run across this in the future.
For the server with the subdomain on it have them create an 'A' record for that subdomain pointing to your server's IP address like so:
Now on your server's cPanel you will need to create an addon domain for THAT subdomain (ie subdomain.business.com) - not for the actual
business.com
domain but for the entire subdomainsubdomain.business.com
with the folder being the root folder wherever you would like it to show.That worked for me!
The CNAME should not point to your nameserver but your subdomain f.e.
client1.webapp.com
.An other solution could be to add the subdomain
app.business.com
to your server and the client add an A record for the subdomain to your ip.