CNAME entry for subdomains not working -- RESOLVED

I am in the process of migrating servers to runcloud.io. On one of those servers, I have an app for billing software. On the old server, the subdomain for that app was clients.uniquelyyourshosting.biz. On the new web server, the domain is clients.uniquelyyourshosting.us. All the domains I own or host are managed through MIAB for both DNS and mail.

I deleted the A record for clients.uniquelyyourshosting.biz and created a CNAME record pointing to clients.uniquelyyourshosting.us. However, when I type the URL into the browser, it tries to resolve to clients.uniquelyyourshosting.biz instead of clients.uniquelyyourshosting.us.

I checked other related posts for CNAME issues and following the suggestions on one of those I did a dig with the following results:
dig clients.uniquelyyourshosting.biz

; <<>> DiG 9.11.3-1ubuntu1.13-Ubuntu <<>> clients.uniquelyyourshosting.biz
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 20978
;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
; COOKIE: 50a4346d00b74816e8f7bbef5f8df0052c2494ec61252515 (good)
;; QUESTION SECTION:
;clients.uniquelyyourshosting.biz. IN   A

;; ANSWER SECTION:
clients.uniquelyyourshosting.biz. 1800 IN CNAME clients.uniquelyyourshosting.us.
clients.uniquelyyourshosting.us. 1800 IN A      104.131.58.67

;; Query time: 279 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Mon Oct 19 15:59:01 EDT 2020
;; MSG SIZE  rcvd: 150

That would seem to indicate that the CNAME record was set up correctly? If so, why isn’t it working?

It is resolving exactly what you told it to. The CNAME is pointed to the .us domain and the .us domain is hosted at 104.131.58.67.

What exactly were you intending? Include IP addresses. I am honestly not sure why you are using a CNAME rather than the actual IP address.

The .biz is pointed to runcloud, and the .us to your Blesta install.

Have you flushed your DNS cache?

It occurred to me after I posted this that what I may need is a 301 redirect. The original URL to this app is clients.uniquelyyourshosting.biz. However, I decided to change the TLD to another one. So what I want is when someone types in clients.uniquelyyourshosting.biz they are redirected instead to clients.uniquelyyourshosting.us.

If this is the case, would I still need the CNAME? The domain uniquelyyourshosting.biz is already pointing to the IP 104.131.58.67. I do have access to the .htaccess file.

Okay. I figured it out. It wasn’t a CNAME thing at all. Sometimes I wonder if my brain is fully functional… :laughing: What works is creating an A record, then creating a rewrite condition in the .htacess file that redirects the sub.domain.oldtld to the sub.domain.newtld.

I will mark this resolved.

1 Like