Difference between CNAME and SUBDOMAIN
A CNAME
is a type of DNS record, where a hostname points at another hostname.
An A
record is another type of DNS record, where a hostname points at an IP address.
A subdomain is what you described as 'the left side of the domain', e.g. webmasters.stackexchange.com
is a subdomain of stackexchange.com
. The DNS setup for a subdomain could use either an A record or a CNAME.
Your question:
Can I point both of these IPs to the same A record, with perhaps a different cname or subdomain?
doesn't really make sense. You don't point IPs at A records, you point hostnames at IPs using A records. If you're asking if you could point a domain and a subdomain at the same IP, the answer is yes.
This might be clearer with a real world example:
webmasters.stackexchange.com
has an A
record that points to the IP 198.252.206.140
.
stackexchange.com
also has an A
record that points to the IP 198.252.206.140
.
It would therefore be possible to change webmasters.stackexchange.com
to CNAME
to stackexchange.com
, and everything would continue to work as it does now.
(In practice, CNAMES
are slightly slower than A
records as they might result in an additional DNS lookup, so that's one reason why A
records are more commonly used.)