Adding subdomain on Namecheap for Shared IP SiteGround website - dns

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

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)

Private Server On Google Cloud Platform and CloudFlare

I am little new to hosting and so I am confused for take step. My current situation is like below
I have one big wordpress site in site ground. Domain is from Godaddy and I am using CloudFlar. I want move this site on Google cloud Instance. So I have created Google cloud instance and have installed Cpanel/WHM. I have copied site on newly created cpanel account. Now My confusion is How I should change DNS for point my domain to Google cloud.
Domain on : Godaddy, Using CloudFlare : Yes, Current Hosting : Site
Ground, New Destination Hosting : Google Cloud, My Current Domain :
example.com
For More information I have setup host like host.example.com and NameServer as ns1.example.com and ns2.example.com on Google cloud. Let me know someone can help me for required step to change DNS so I can successfully move without downtime.
Thanks a lot.
You need to update the IP address for your domain in the DNS records which are hosted either with godaddy or with cloudflare. If you are not sure, do a dig NS yourdomain.com See which dns server's are coming. and accordingly make the change.

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

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.

Having trouble configuring custom domains on Xervo

I have a meteor project deployed on Xervo here. I have a domain bought from GoDaddy, ustechland.com. I'm configuring custom domains in my project's administration panel on Xervo.
2
*.ustechland.com means all subdomains of this domain will point to this project. Now when I hit ustechland.com in the address bar, the URL changes to the project URL (https://utl-95476.app.xervo.io), which I don't want to happen.
I have configured CNAME records in my GoDaddy's domain DNS as specified by the Xervo Docs here.
Here is my list of CNAME DNS Records in GoDaddy:
4
Although, the Xervo custom domain docs specify to add two CNAME records, I'm able to add one CNAME record with www subdomain pointing to Joyent Servo in US-East. Another record with naked domain (#) must be added pointing to the same. But I'm not able to add this record as GoDaddy says the record already exists.
Now, is the URL changing because I'm not able to add the CNAME record required? Do try hitting ustechland.com or www.ustechland.com and see the URL change.
And at times, both these URL's take me to 'Future home of something quite cool' page.
I have found several sources that claim that godaddy does not support root cname flattening (which is what you want).
Check out these ideas for how to deal with this.
CNAME Flattening With GoDaddy.
Quora Answer
Good luck!

How to add subdomain entry

I have a domain name (somename.com) registered at godaddy and i am using godaddy DNS Manager. But i am hosting my website with hostinger.com. So i have created a subdomain (sub.somename.com) on hostinger which by default points to same IP as a domain.
Now i have entry on godaddy DNS for my domain and subdomain name which points to hostinger server address where my website hosted. But when i access my subdomain (sub.somename.com) it goes to my somename.com. I have to refresh it to load sub domain page correctly.
Godaddy DNS Entry
domainname -- somename.com -> IP address of hostinger.com
subdomain -- sub.somename.com --> IP address of hostinger.com (same as above)
Hostinger DNS Entry
subdomain -- sub.somename.com --> IP address of hostinger.com(same as above)
Is above entries is correct ?
Should we need to have entry for domain and subdomain both on godaddy DNS ?
Do we need to have a entry for subdomain in hostinger.com also ?
In order to create a subdomain correctly you have to go through 2 steps:
1. Update your DNS records, so they accept your subdomain (sub.somename.com).
You should have these records for your setup:
A: # -> IP of hostinger.com (this is to connect the domain with hostinger)
A: sub -> IP of hostinger.com (only put the subdomain name)
CNAME: * -> somename.com (so that everything before somename.com goes to somename.com)
CNAME: *.sub -> sub.somename.com (so that everything before sub.somename.com goes to somename.com)
There are different types of DNS Records, the one's you mentioned are all A Records, you have to use CNAME Records as well.
2. Creating a virtual host (on the hosting provider)
The previous step was so that the Domain Name Servers know to which ip to point when the subdomain is used. From this side we have to point the subdomain address (sub.somename.com) to a specific folder that contains the different website. Most host providers, when you create a subdomain automatically create a new folder you can put your content at and point at it.
So to answer your questions.
No you have to change your DNS Records so they match the information above. Let me remind you that changes in the DNS Records might take a while to take effect (1-2 hours).
Your DNS entries should be at one place. Usually they are provided by the hosting provider (hostinger in this case), but since they are also provided by GoDaddy as well feel free to update them there.
There is no need to have a DNS entry in hostinger if you update them in GoDaddy.
P.S. Since I haven't used hostinger before, feel free to update me if you have more info, like if you're using CPanel.
If you intend to host a subdomain at an IP different than your main site, the records should look like this.
Main Site (mysite.com)
Type: A
Name(Host): #
Value(Points To): 192.168.1.1
Blog Site (blog.mysite.com)
Type: A
Name(Host): blog
Value(Points To): 192.168.1.2
As a reference, you only need an A record to host a subdomain. CNAME record is an alias. www records are usually CNAME records to the root domain as they are the same page.
Hope this helps!

Resources