github.com/philhug/dnscontrol@v0.2.4-0.20180625181521-921fa9849001/docs/_functions/domain/CNAME.md (about) 1 --- 2 name: CNAME 3 parameters: 4 - name 5 - target 6 - modifiers... 7 --- 8 9 CNAME adds a CNAME record to the domain. The name should be the relative label for the domain. 10 Using `@` or `*` for CNAME records is not recommended, as different providers support them differently. 11 12 Target should be a string representing the CNAME target. If it is a single label we will assume it is a relative name on the current domain. If it contains *any* dots, it should be a fully qualified domain name, ending with a `.`. 13 14 {% include startExample.html %} 15 {% highlight js %} 16 17 D("example.com", REGISTRAR, DnsProvider("R53"), 18 CNAME("foo", "google.com."), // foo.example.com -> google.com 19 CNAME("abc", "@"), // abc.example.com -> example.com 20 CNAME("def", "test.subdomain"), // def.example.com -> test.subdomain.example.com 21 ); 22 23 {%endhighlight%} 24 {% include endExample.html %}