네트워크/보안

A record와 CNAME 의 차이점

buykiwi 2016. 2. 8. 11:41

Differences between the A and CNAME records

The A and CNAME(canonical * (성경이) 정본에 속하는 name) records are the two common ways to map an host name (name hereafter) to one or more IP address. Before going ahead, it’s important that you really understand the differences between these two records. I’ll keep it simple.

The A record points a name to a specific IP. For example, if you want the nameblog.dnsimple.com to point to the server 185.31.17.133 you will configure

blog.dnsimple.com. A 185.31.17.133

The CNAME record points a name to another name, instead of an IP. The CNAME source represents an alias for the target name and inherits its entire resolution chain. Let’s take our blogas example.

blog.dnsimple.com.      CNAME	aetrion.github.io.
aetrion.github.io.      CNAME	github.map.fastly.net.
github.map.fastly.net	A	    185.31.17.133

We use GitHub Pages and we set blog.dnsimple.com as a CNAME of aetrion.github.io, which in turns is itself a CNAME of github.map.fastly.net, which is an A record pointing to185.31.17.133. In short terms, this means that blog.dnsimple.com resolves to 185.31.17.133.

To summarize, an A record points a name to an IPCNAME record can point a name to anotherCNAME or an A record.

출처; https://support.dnsimple.com/articles/differences-a-cname-records/