CNAME resolving to wrong A record under same domain
We've had a cPanel server hosting our domain for a couple decades now I think. We now have a website with Squarespace and email accounts with Google, while still hosting our domain on the cPanel server. There are Mx records directed at Google's mail servers and that works. We have multiple A records directed at Squarespace servers to point our domain name there, but also have A records to keep our domain pointed at the cPanel server as well. The records for Squarespace work and we're able to access our website. We then have a CNAME record pointing the name cPanel at our domain, but it's resolving to the Squarespace servers and pulling up our website when using the subdomain name cPanel. It was working yesterday, but today it is not. Any way I can get cPanel to resolve to our cPanel server rather than the Squarespace servers? Thanks in advance.
-
Hey there! Just to confirm:
domain.com - works great
cpanel.domain.com - points to the wrong IP addressIs that correct? By default, cPanel creates an A record for the "cpanel" subdomain to the IP address of the domain, so you'll want to check where your DNS is hosted to confirm those records are in place.
You could use a simple dig command from your local workstation to check the DNS:
dig cpanel.domain.com
to see what IP address that returns.
0 -
Thanks for the reply. Yes, domain.com works great, in the sense that it directs www.domain.com to my Squarespace website. There is a www CNAME record with "ext-cust.squarespace.com" for the record value, as well as 4 A records pointing the domain to Squarespace IP addresses.
I know that there was always a CNAME record, presenting cPanel as a subdomain for domain.com. I don't recollect ever seeing an A record pointing cPanel.domain.com to my Cpanel server's IP address, but I did try changing the cpanel CNAME record to an A record and pointing it to the IP address. It still brings up the website doing that, rather than cPanel. I tried right after that creating a CNAME record to coincide with the A record, but it errors out, I'm assuming because I can't have both, only one or the other.
0 -
In your case you definitely want the A record, and you are correct that you can't have both.
If you just recently made the change it will need to go through DNS propagation, so I wouldn't expect it to work instantly.
0 -
Thanks! I'll give it time and see if cpanel.domain.com works.
0
Please sign in to leave a comment.
Comments
4 comments