How to allow CNAME pointed to my server / how to use subdomain for a different server? - dns

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!

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:
subdomain.business.com. ((note the extra period at the end is required))
TTL: 14400
Record Type: A
Pointing To: Your server's IP address.
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 subdomain subdomain.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.

Related

Setting up subdomain using google domains

I have a domain that I bought on Google Domains, and have a website hosted on it using Hugo + Netlify. I'd like to use a separately hosted blog website based on Jekyll on a subdomain with the name blog.example.com.
Looking online I was able to find - https://support.google.com/domains/answer/6072198?hl=en, which it seems like will re-direct the subdomain to a different web address, but not exactly allow me to host my site on that subdomain.
Can anyone explain to me how I can go about doing that?
You will need a CNAME record in your Google DNS:
blog.example.com will point to 192.0.2.4 (use the IP given to you)
Then the subdomain blog will be in the hands of your blog hosting provider.
If there is a CNAME record for *.example.com, you will need to replace that by www.example.com to point towards your example.com A record (which points to your default website host's IP)

Created Two DNS in two different Provider

I am new in developed website. I have accidentally created a new DNS zone in Microsoft Azure which the domain already has its own DNS in another hosting company. The hosting company help to handle email of the domain.
Besides that, the company was also pointed the root domain to my web app by using A record.
The website now can be accessed via domain.com but not www.domain.com.
What is the solution for me to point www.domain.com to my web app domain.azurewebsites.net and without affect mail.domain.com?
What is the solution for me to point www.domain.com to my web app
domain.azurewebsites.net and without affect mail.domain.com?
We can add CNAME record to your web app service like this:
Host type value
www CNAME xxx.domain.azurewebsites.net
how about if I set cname * and point to domain.azurewebsites.net, will
it affect mail.domain.com?
If you set CNAME * and point to domain.azurewebsites.net, that will not affect mail.domain.com.
Because mail type is MX record, that will not affect CNAME record.
Hope this helps.

Adding subdomain on Namecheap for Shared IP SiteGround website

I have been figuring out how to accomplish this for a day now and read through a bunch of tutorials but could not make it work the way I wanted.
So my current set up is that I have a website that I registered the domain with Namecheap, let's call it mywebsite.com. The main app is hosted on Heroku, so both mywebsite.com and www.mywebsite.com is set up as URL redirect and CNAME to point to the heroku address. For example I have a CNAME record for www pointing to www.mywebsite.com.herokudns.com. This works fine and I would like to keep it that way.
I recently registered for a SiteGround service to set up my wordpress blog. I would like it to be accessible at blog.mywebsite.com. Most of the tutorial I have seen is to either migrate the domain to siteground so the wordpress site can point to the main domain or to point the namecheap DNS nameservers to the siteground one which I don't want to do neither because I do not want to redirect the traffic away from the heroku app.
I have tried to set up NSRecord according to Namecheap doc, I added the record for blog to point to ns1.siteground1111.com (the nameservers siteground provided) but when I entered blog.mywebsite.com it said server not found. I am on a SiteGround shared IP plan and I can see the blog if I visit ns1.siteground205.com/~myusername. However creating A record or CNAME requires bare IP and domain so I wonder if that's the issue.
My question is if my approach was correct in trying to set up the subdomain by creating a NSRecord on Namecheap pointing to SiteGround's nameservers. Or is it necessary for me to pay extra and get a dedicated IP address from SiteGround for me to point my A record for blog to.
Alternatively, I also have extra domains I am not using and I could set SiteGround blog to those domains and perhaps create a CNAME record for blog.mywebsite.com to www.myotherwebsite.com? That sounds like an overcomplication of the issue but I am not sure what to try at this point.
Really appreciate any help!
In Namecheap admin for your domain name mywebsite.com:
(1) Create an A record:
[type, host, value, TTL]
A, #, 1.2.3.4, 1min
where 1.2.3.4 is the Siteground IP address of your account.
(2) Create another A record:
A, blog, 1.2.3.4, Automatic

Adding one more domain to my Hostgator server

My client has bought two domains for his website: goiasverdade.com.br and goiasverdade.com
The main domain is goiasverdade.com.br, but he wants to redirect the visitors who enter the .com domain to the .com.br.
The .com.br domain is already registered in the Hostgator server. But now I don't know how to add another domain to the server and also redirect it to the main .com.br address. I have the DNS address for the .com domain, but where do I add it in the server Control Panel?.
Thanks for the help guys!
I think you'd want to add the extra domain name as an add on domain. Then I think you'd want to redirect the domain so that it redirects (forwards) to the other one.
Then you'll of course want to test everything to make sure everything works. If you're a developer, you may want to look at Digital Ocean or Linode hosting if you want to have more control over your servers.

very simple -- how do i setup a subdomain with 1&1 domain provider + hostgator hosting?

Everytime I try to create a subdomain with this combo, it simply says the page doesn't exist. I have the subdomain directory created, so I'm not sure what I'm doing wrong. for example if I want
subdomain.domain.com, then
domain.com/subdomain will work, but
subdomain.domain.com won't work.
Any insight?
Firstly you will need a DNS record for you subdomain. This can be a CNAME record if you just want the the subdomain to be an alias of the main domain (Canonical Name). If you want the subdomain to be hosted on a different IP address or server then you need a new A record.
From the sounds of it you want a CNAME record for your subdomain created in your DNS manager, and then you want to configure your web server to look at the host headers to map to the sub directory you created. How you go about this depends on the type of web server.

Resources