mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2024-12-27 02:02:48 +08:00
New example: Typical DNS records.
This commit is contained in:
parent
7073b8f989
commit
be192526ef
1 changed files with 26 additions and 1 deletions
|
@ -7,6 +7,31 @@ layout: default
|
|||
* TOC
|
||||
{:toc}
|
||||
|
||||
## Typical DNS Records
|
||||
|
||||
{% highlight javascript %}
|
||||
|
||||
D('example.com', REG, DnsProvider('GCLOUD'),
|
||||
A('@', '1.2.3.4'), // The naked or 'apex' domain.
|
||||
A('server1', '2.3.4.5'),
|
||||
AAAA('wide', '2001:0db8:85a3:0000:0000:8a2e:0370:7334'),
|
||||
CNAME('www', 'server1'),
|
||||
CNAME('another', 'service.mycloud.com.'),
|
||||
MX('mail, 10, 'mailserver'),
|
||||
MX('mail', 20, 'mailqueue'),
|
||||
TXT('the', 'message'),
|
||||
NS('delegated', 'ns1.dnsexample.com.'),
|
||||
NS('delegated', 'ns2.dnsexample.com.'),
|
||||
)
|
||||
|
||||
{% endhighlight %}
|
||||
|
||||
## Set a specific TTL for a record
|
||||
|
||||
{% highlight javascript %}
|
||||
A('one', '1.2.3.4', TTL(400)),
|
||||
{% endhighlight %}
|
||||
|
||||
## Variables for common IP Addresses
|
||||
|
||||
{% highlight javascript %}
|
||||
|
@ -72,4 +97,4 @@ D("example3.com", REG, DnsProvider("R53"), DnsProvider("GCLOUD",0),
|
|||
A("@", "1.2.3.4")
|
||||
)
|
||||
|
||||
{% endhighlight %}
|
||||
{% endhighlight %}
|
||||
|
|
Loading…
Reference in a new issue