Cannot browse to sub-domain
Using Firefox on Ubuntu18.04, and I somehow must have messed up some internal tables, for I'm unable to reach a sub-domain. I tried with Chromium, to no avail (DNS_PROBE_FINISHED_NXDOMAIN). The message in Firefox: "We can’t connect to the server at domino-ideas.hcltechsw.com."
On a Windows VM everything works (on the same Ubuntu machine), so I know both the main and the sub domains are active.
Main: Sub:
What did I do wrong, and how to fix this?
71 Answer
Your CNAME record for the subdomain at the DNS level is wrong and incorrect. The CNAME currently returns as: which is NOT a valid CNAME entry. (see the RFC1123 detailing hostnames, RFC2219 detailing the use of DNS aliases which are what CNAMEs are, and Wikipedia and DNSSimple's pages on CNAME syntax and details on CNAME records)
The CNAME record is supposed to be the domain only - not a URL, not an IP address, no scheme to define connection patterns - JUST the domain that this is being an 'alias' to for IP resolution.
Web browsers such as Chrome, Firefox, Edge / Internet Explorer, Opera, etc. all rely on the CNAME entries actually being DNS compliant, and this DNS entry is not.
(While modern dig and such are capable of doing the translations of this to the proper CNAME entry, CNAMEs are NOT HTTP/HTTPS redirects and MUST be compliant with the rules for CNAMEs, and browsers are not robust enough to actually process these kinds of mistakes in DNS record entries)
Wherever the DNS for your domain is hosted, you need to update your DNS to actually have the CNAME be domino.ideas.aha.io and not the URL you're targeting.
Below is the verbose dig @8.8.8.8 domino-ideas.hcltechsw.com. lookup results, showing the CNAME and such. Note that dig is an ISC tool that is used to do DNS lookups and return DNS results, but most browsers will use the system's resolver functions which may not be as 'flexible' as dig is for resolving things.
$ dig @8.8.8.8 domino-ideas.hcltechsw.com.
; <<>> DiG 9.11.3-1ubuntu1.9-Ubuntu <<>> @8.8.8.8 domino-ideas.hcltechsw.com.
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 9549
;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 512
;; QUESTION SECTION:
;domino-ideas.hcltechsw.com. IN A
;; ANSWER SECTION:
domino-ideas.hcltechsw.com. 299 IN CNAME 3599 IN A 35.171.201.123
;; Query time: 61 msec
;; SERVER: 8.8.8.8#53(8.8.8.8)
;; WHEN: Mon Oct 28 10:29:26 EDT 2019
;; MSG SIZE rcvd: 112 4