diff --git a/documentation/providers/akamaiedgedns.md b/documentation/providers/akamaiedgedns.md index 5e46f31b9..6f0a92472 100644 --- a/documentation/providers/akamaiedgedns.md +++ b/documentation/providers/akamaiedgedns.md @@ -50,14 +50,17 @@ The NS records for these authorities have a TTL of 86400. Add: +{% code title="dnsconfig.js" %} ```javascript NAMESERVER_TTL(86400) ``` +{% endcode %} modifier to the dnscontrol.js D() function so that DNSControl does not change the TTL of the authoritative NS records. Example `dnsconfig.js`: +{% code title="dnsconfig.js" %} ```javascript var REG_NONE = NewRegistrar("none"); var DSP_AKAMAIEDGEDNS = NewDnsProvider("akamaiedgedns"); @@ -69,6 +72,7 @@ D("example.com", REG_NONE, DnsProvider(DSP_AKAMAIEDGEDNS), A("foo", "1.2.3.4") ); ``` +{% endcode %} AKAMAICDN is a proprietary record type that is used to configure [Zone Apex Mapping](https://www.akamai.com/blog/security/edge-dns--zone-apex-mapping---dnssec). The AKAMAICDN target must be preconfigured in the Akamai network. diff --git a/documentation/providers/autodns.md b/documentation/providers/autodns.md index 6c04adb50..090706818 100644 --- a/documentation/providers/autodns.md +++ b/documentation/providers/autodns.md @@ -20,8 +20,9 @@ Example: ## Usage -An example `dnsconfig.js` configuration: +An example configuration: +{% code title="dnsconfig.js" %} ```javascript var REG_NONE = NewRegistrar("none"); var DSP_AUTODNS = NewDnsProvider("autodns"); @@ -30,3 +31,4 @@ D("example.tld", REG_NONE, DnsProvider(DSP_AUTODNS), A("test", "1.2.3.4") ); ``` +{% endcode %} diff --git a/documentation/providers/axfrddns.md b/documentation/providers/axfrddns.md index 13b702462..9e20ba531 100644 --- a/documentation/providers/axfrddns.md +++ b/documentation/providers/axfrddns.md @@ -53,10 +53,12 @@ operations, which is the least secure option. If distinct zones require distinct keys, you will need to instantiate the provider once for each key: +{% code title="dnsconfig.js" %} ```javascript var DSP_AXFRDDNS_A = NewDnsProvider("axfrddns-a"); var DSP_AXFRDDNS_B = NewDnsProvider("axfrddns-b"); ``` +{% endcode %} And update `creds.json` accordingly: @@ -84,6 +86,7 @@ provider. This list can be provided either as metadata or in `creds.json`. Only the later allows `get-zones` to work properly. +{% code title="dnsconfig.js" %} ```javascript var DSP_AXFRDDNS = NewDnsProvider("axfrddns", { "default_ns": [ @@ -95,6 +98,7 @@ var DSP_AXFRDDNS = NewDnsProvider("axfrddns", { } } ``` +{% endcode %} ```json { diff --git a/documentation/providers/azure_dns.md b/documentation/providers/azure_dns.md index dca2b1d0a..8025c423d 100644 --- a/documentation/providers/azure_dns.md +++ b/documentation/providers/azure_dns.md @@ -49,8 +49,9 @@ export AZURE_CLIENT_SECRET=BBBBBBBBB This provider does not recognize any special metadata fields unique to Azure DNS. ## Usage -An example `dnsconfig.js` configuration: +An example configuration: +{% code title="dnsconfig.js" %} ```javascript var REG_NONE = NewRegistrar("none"); var DSP_AZURE_MAIN = NewDnsProvider("azuredns_main"); @@ -59,6 +60,7 @@ D("example.tld", REG_NONE, DnsProvider(DSP_AZURE_MAIN), A("test", "1.2.3.4") ); ``` +{% endcode %} ## Activation DNSControl depends on a standard [Client credentials Authentication](https://docs.microsoft.com/en-us/cli/azure/create-an-azure-service-principal-azure-cli?view=azure-cli-latest) with permission to list, create and update hosted zones. diff --git a/documentation/providers/bind.md b/documentation/providers/bind.md index f26bf6818..2cb6f5084 100644 --- a/documentation/providers/bind.md +++ b/documentation/providers/bind.md @@ -37,6 +37,7 @@ This provider accepts some optional metadata in the NewDnsProvider() call. In this example we set the default SOA settings and NS records. +{% code title="dnsconfig.js" %} ```javascript var DSP_BIND = NewDnsProvider("bind", { "default_soa": { @@ -55,6 +56,7 @@ var DSP_BIND = NewDnsProvider("bind", { ] }) ``` +{% endcode %} # FYI: SOA Records diff --git a/documentation/providers/cloudflareapi.md b/documentation/providers/cloudflareapi.md index c30162824..ae1fae5ca 100644 --- a/documentation/providers/cloudflareapi.md +++ b/documentation/providers/cloudflareapi.md @@ -120,17 +120,20 @@ What does on/off/full mean? You can also set the default proxy mode using `DEFAULTS()` function. For example: +{% code title="dnsconfig.js" %} ```javascript DEFAULTS( CF_PROXY_DEFAULT_OFF // turn proxy off when not specified otherwise ); ``` +{% endcode %} **Aliases:** To make configuration files more readable and less prone to errors, the following aliases are *pre-defined*: +{% code title="dnsconfig.js" %} ```javascript // Meta settings for individual records. var CF_PROXY_OFF = {"cloudflare_proxy": "off"}; // Proxy disabled. @@ -146,9 +149,11 @@ var CF_UNIVERSALSSL_OFF = { cloudflare_universalssl: "off" }; // UniversalSSL on for entire domain: var CF_UNIVERSALSSL_ON = { cloudflare_universalssl: "on" }; ``` +{% endcode %} The following example shows how to set meta variables with and without aliases: +{% code title="dnsconfig.js" %} ```javascript D("example.tld", REG_NONE, DnsProvider(DSP_CLOUDFLARE), A("www1","1.2.3.11", CF_PROXY_ON), // turn proxy ON. @@ -156,10 +161,12 @@ D("example.tld", REG_NONE, DnsProvider(DSP_CLOUDFLARE), A("www3","1.2.3.13", {"cloudflare_proxy": "on"}) // Old format. ); ``` +{% endcode %} ## Usage -An example `dnsconfig.js` configuration: +An example configuration: +{% code title="dnsconfig.js" %} ```javascript var REG_NONE = NewRegistrar("none"); var DSP_CLOUDFLARE = NewDnsProvider("cloudflare"); @@ -183,7 +190,7 @@ D("example2.tld", REG_NONE, DnsProvider(DSP_CLOUDFLARE), CNAME("myalias", "www.example2.tld.") ); ``` - +{% endcode %} ## New domains If a domain does not exist in your Cloudflare account, DNSControl @@ -194,6 +201,7 @@ control panel manually or via the `dnscontrol create-domains` command. ## Redirects The Cloudflare provider can manage "Forwarding URL" Page Rules (redirects) for your domains. Simply use the `CF_REDIRECT` and `CF_TEMP_REDIRECT` functions to make redirects: +{% code title="dnsconfig.js" %} ```javascript // chiphacker.com should redirect to electronics.stackexchange.com @@ -214,6 +222,7 @@ D("chiphacker.com", REG_NONE, DnsProvider(DSP_CLOUDFLARE), // ... ); ``` +{% endcode %} Notice a few details: @@ -225,6 +234,7 @@ Notice a few details: ## Worker routes The Cloudflare provider can manage Worker Routes for your domains. Simply use the `CF_WORKER_ROUTE` function passing the route pattern and the worker name: +{% code title="dnsconfig.js" %} ```javascript var DSP_CLOUDFLARE = NewDnsProvider("cloudflare", {"manage_workers": true}); // enable managing worker routes @@ -234,6 +244,7 @@ D("foo.com", REG_NONE, DnsProvider(DSP_CLOUDFLARE), CF_WORKER_ROUTE("foo.com/api/*", "my-worker"), ); ``` +{% endcode %} The API key you use must be enabled to edit workers. In the portal, edit the API key, under "Permissions" add "Account", "Workers Scripts", "Edit". Without this permission you may see errors that mention "failed fetching worker route list from cloudflare: bad status code from cloudflare: 403 not 200" diff --git a/documentation/providers/cloudns.md b/documentation/providers/cloudns.md index ea105f1cc..1eccc5b83 100644 --- a/documentation/providers/cloudns.md +++ b/documentation/providers/cloudns.md @@ -35,6 +35,7 @@ This provider does not recognize any special metadata fields unique to ClouDNS. ClouDNS supports ClouDNS-specific "WR record (web redirects)" for your domains. Simply use the `CLOUDNS_WR` functions to make redirects like any other record: +{% code title="dnsconfig.js" %} ```javascript var REG_NONE = NewRegistrar("none"); var DSP_CLOUDNS = NewDnsProvider("cloudns"); @@ -44,10 +45,12 @@ D("example.tld", REG_NONE, DnsProvider(DSP_CLOUDNS), CLOUDNS_WR("www", "http://example.com/") ) ``` +{% endcode %} ## Usage -An example `dnsconfig.js` configuration: +An example configuration: +{% code title="dnsconfig.js" %} ```javascript var REG_NONE = NewRegistrar("none"); var DSP_CLOUDNS = NewDnsProvider("cloudns"); @@ -56,6 +59,7 @@ D("example.tld", REG_NONE, DnsProvider(DSP_CLOUDNS), A("test", "1.2.3.4") ); ``` +{% endcode %} ## Activation [Create Auth ID](https://www.cloudns.net/api-settings/). Only paid account can use API diff --git a/documentation/providers/cscglobal.md b/documentation/providers/cscglobal.md index 50ff84cad..b677043b2 100644 --- a/documentation/providers/cscglobal.md +++ b/documentation/providers/cscglobal.md @@ -29,8 +29,9 @@ Example: {% endcode %} ## Usage -An example `dnsconfig.js` configuration: +An example configuration: +{% code title="dnsconfig.js" %} ```javascript var REG_CSCGLOBAL = NewRegistrar("cscglobal"); var DSP_BIND = NewDnsProvider("bind"); @@ -39,6 +40,7 @@ D("example.tld", REG_CSCGLOBAL, DnsProvider(DSP_BIND), A("test", "1.2.3.4") ); ``` +{% endcode %} ## Activation To get access to the [CSC Global API](https://www.cscglobal.com/cscglobal/docs/dbs/domainmanager/api-v2/) contact your account manager. diff --git a/documentation/providers/desec.md b/documentation/providers/desec.md index 11ee9ff5a..cab51c4f8 100644 --- a/documentation/providers/desec.md +++ b/documentation/providers/desec.md @@ -20,8 +20,9 @@ Example: This provider does not recognize any special metadata fields unique to deSEC. ## Usage -An example `dnsconfig.js` configuration: +An example configuration: +{% code title="dnsconfig.js" %} ```javascript var REG_NONE = NewRegistrar("none"); // No registrar. var DSP_DESEC = NewDnsProvider("desec"); // deSEC @@ -30,6 +31,7 @@ D("example.tld", REG_NONE, DnsProvider(DSP_DESEC), A("test", "1.2.3.4") ); ``` +{% endcode %} ## Activation DNSControl depends on a deSEC account auth token. diff --git a/documentation/providers/digitalocean.md b/documentation/providers/digitalocean.md index e48d4a17e..18d119a5d 100644 --- a/documentation/providers/digitalocean.md +++ b/documentation/providers/digitalocean.md @@ -20,8 +20,9 @@ Example: This provider does not recognize any special metadata fields unique to DigitalOcean. ## Usage -An example `dnsconfig.js` configuration: +An example configuration: +{% code title="dnsconfig.js" %} ```javascript var REG_NONE = NewRegistrar("none"); var DSP_DIGITALOCEAN = NewDnsProvider("mydigitalocean"); @@ -30,6 +31,7 @@ D("example.tld", REG_NONE, DnsProvider(DSP_DIGITALOCEAN), A("test", "1.2.3.4") ); ``` +{% endcode %} ## Activation [Create OAuth Token](https://cloud.digitalocean.com/settings/applications) diff --git a/documentation/providers/dnsimple.md b/documentation/providers/dnsimple.md index ef429fd0e..f3182c26e 100644 --- a/documentation/providers/dnsimple.md +++ b/documentation/providers/dnsimple.md @@ -27,8 +27,9 @@ Examples: This provider does not recognize any special metadata fields unique to DNSimple. ## Usage -An example `dnsconfig.js` configuration: +An example configuration: +{% code title="dnsconfig.js" %} ```javascript var REG_DNSIMPLE = NewRegistrar("dnsimple"); var DSP_DNSIMPLE = NewDnsProvider("dnsimple"); @@ -37,6 +38,7 @@ D("example.tld", REG_DNSIMPLE, DnsProvider(DSP_DNSIMPLE), A("test", "1.2.3.4") ); ``` +{% endcode %} ## Activation DNSControl depends on a DNSimple account access token. diff --git a/documentation/providers/dnsmadeeasy.md b/documentation/providers/dnsmadeeasy.md index 6271eba29..c8531c217 100644 --- a/documentation/providers/dnsmadeeasy.md +++ b/documentation/providers/dnsmadeeasy.md @@ -29,8 +29,9 @@ SPF records are ignored by this provider. Use TXT records instead. This provider does not recognize any special metadata fields unique to DNS Made Easy. ## Usage -An example `dnsconfig.js` configuration: +An example configuration: +{% code title="dnsconfig.js" %} ```javascript var REG_NONE = NewRegistrar("none"); var DSP_DNSMADEEASY = NewDnsProvider("dnsmadeeasy"); @@ -39,6 +40,7 @@ D("example.tld", REG_NONE, DnsProvider(DSP_DNSMADEEASY), A("test", "1.2.3.4") ); ``` +{% endcode %} ## Activation You can generate your `api_key` and `secret_key` in [Control Panel](https://cp.dnsmadeeasy.com/) in Account Information in Config menu. diff --git a/documentation/providers/dnsoverhttps.md b/documentation/providers/dnsoverhttps.md index 2f6c5b069..002a88c31 100644 --- a/documentation/providers/dnsoverhttps.md +++ b/documentation/providers/dnsoverhttps.md @@ -39,8 +39,9 @@ Some common DoH providers are: This provider does not recognize any special metadata fields unique to DOH. ## Usage -An example `dnsconfig.js` configuration: +An example configuration: +{% code title="dnsconfig.js" %} ```javascript var REG_MONITOR = NewRegistrar("dohcloudflare"); @@ -49,6 +50,7 @@ D("example.com", REG_MONITOR, NAMESERVER("ns2.example.com."), ); ``` +{% endcode %} {% hint style="info" %} **NOTE**: This checks the NS records via a DNS query. It does not check the diff --git a/documentation/providers/domainnameshop.md b/documentation/providers/domainnameshop.md index 93e6cefd9..3edea1429 100644 --- a/documentation/providers/domainnameshop.md +++ b/documentation/providers/domainnameshop.md @@ -21,8 +21,9 @@ Example: This provider does not recognize any special metadata fields unique to Domainnameshop. ## Usage -An example `dnsconfig.js` configuration: +An example configuration: +{% code title="dnsconfig.js" %} ```javascript var REG_NONE = NewRegistrar("none"); var DSP_DOMAINNAMESHOP = NewDnsProvider("mydomainnameshop"); @@ -31,6 +32,7 @@ D("example.tld", REG_NONE, DnsProvider(DSP_DOMAINNAMESHOP), A("test", "1.2.3.4") ); ``` +{% endcode %} ## Activation [Create API Token and secret](https://www.domeneshop.no/admin?view=api) diff --git a/documentation/providers/easyname.md b/documentation/providers/easyname.md index fafb8391a..748d771f7 100644 --- a/documentation/providers/easyname.md +++ b/documentation/providers/easyname.md @@ -26,8 +26,9 @@ Example: This provider does not recognize any special metadata fields unique to easyname. ## Usage -An example `dnsconfig.js` configuration: +An example configuration: +{% code title="dnsconfig.js" %} ```javascript var REG_EASYNAME = NewRegistrar("easyname"); @@ -36,6 +37,7 @@ D("example.com", REG_EASYNAME, NAMESERVER("ns2.example.com."), ); ``` +{% endcode %} ## Activation diff --git a/documentation/providers/gandi_v5.md b/documentation/providers/gandi_v5.md index fe1aceeff..050e11a20 100644 --- a/documentation/providers/gandi_v5.md +++ b/documentation/providers/gandi_v5.md @@ -51,8 +51,9 @@ This provider only supports `ALIAS` on the `"@"` zone apex, not on any other names. ## Usage -An example `dnsconfig.js` configuration: +An example configuration: +{% code title="dnsconfig.js" %} ```javascript var REG_GANDI = NewRegistrar("gandi"); var DSP_GANDI = NewDnsProvider("gandi"); @@ -61,6 +62,7 @@ D("example.tld", REG_GANDI, DnsProvider(DSP_GANDI), A("test", "1.2.3.4") ); ``` +{% endcode %} If you are converting from the old "GANDI" provider, simply change "GANDI" to "GANDI_V5" in `dnsconfig.js`. diff --git a/documentation/providers/gcloud.md b/documentation/providers/gcloud.md index 246bcf574..0a3b2035b 100644 --- a/documentation/providers/gcloud.md +++ b/documentation/providers/gcloud.md @@ -57,8 +57,9 @@ Example: This provider does not recognize any special metadata fields unique to google cloud dns. ## Usage -An example `dnsconfig.js` configuration: +An example configuration: +{% code title="dnsconfig.js" %} ```javascript var REG_NONE = NewRegistrar("name.com"); var DSP_GCLOUD = NewDnsProvider("gcloud"); @@ -67,6 +68,7 @@ D("example.tld", REG_NONE, DnsProvider(DSP_GCLOUD), A("test", "1.2.3.4") ); ``` +{% endcode %} ## Activation 1. Go to your app-engine console and select the appropriate project. diff --git a/documentation/providers/gcore.md b/documentation/providers/gcore.md index dc783e9c8..3dcfe573b 100644 --- a/documentation/providers/gcore.md +++ b/documentation/providers/gcore.md @@ -20,8 +20,9 @@ Example: This provider does not recognize any special metadata fields unique to Gcore. ## Usage -An example `dnsconfig.js` configuration: +An example configuration: +{% code title="dnsconfig.js" %} ```javascript var REG_NONE = NewRegistrar("none"); // No registrar. var DSP_GCORE = NewDnsProvider("gcore"); // Gcore @@ -30,6 +31,7 @@ D("example.tld", REG_NONE, DnsProvider(DSP_GCORE), A("test", "1.2.3.4") ); ``` +{% endcode %} ## Activation diff --git a/documentation/providers/hedns.md b/documentation/providers/hedns.md index 64a90e773..fcb8a9aa6 100644 --- a/documentation/providers/hedns.md +++ b/documentation/providers/hedns.md @@ -101,8 +101,9 @@ This option is disabled by default when this key is not present, This provider does not recognize any special metadata fields unique to Hurricane Electric DNS. ## Usage -An example `dnsconfig.js` configuration: +An example configuration: +{% code title="dnsconfig.js" %} ```javascript var REG_NONE = NewRegistrar("none"); var DSP_HEDNS = NewDnsProvider("hedns"); @@ -111,3 +112,4 @@ D("example.tld", REG_NONE, DnsProvider(DSP_HEDNS), A("test", "1.2.3.4") ); ``` +{% endcode %} diff --git a/documentation/providers/hetzner.md b/documentation/providers/hetzner.md index 748c1a81b..6283fe9a1 100644 --- a/documentation/providers/hetzner.md +++ b/documentation/providers/hetzner.md @@ -23,8 +23,9 @@ This provider does not recognize any special metadata fields unique to Hetzner ## Usage -An example `dnsconfig.js` configuration: +An example configuration: +{% code title="dnsconfig.js" %} ```javascript var REG_NONE = NewRegistrar("none"); var DSP_HETZNER = NewDnsProvider("hetzner"); @@ -33,6 +34,7 @@ D("example.tld", REG_NONE, DnsProvider(DSP_HETZNER), A("test", "1.2.3.4") ); ``` +{% endcode %} ## Activation diff --git a/documentation/providers/hexonet.md b/documentation/providers/hexonet.md index c30e83c12..a17425c2b 100644 --- a/documentation/providers/hexonet.md +++ b/documentation/providers/hexonet.md @@ -71,6 +71,7 @@ Here's an example DNS Configuration `dnsconfig.js` using our provider module. Even though it shows how you use us as Domain Registrar AND DNS Provider, we don't force you to do that. You are free to decide if you want to use both of our provider technology or just one of them. +{% code title="dnsconfig.js" %} ```javascript // Providers: var REG_HX = NewRegistrar("hexonet"); @@ -95,6 +96,7 @@ D("abhoster.com", REG_HX, DnsProvider(DSP_HX), A("test", "56.123.54.12") ); ``` +{% endcode %} ## Metadata diff --git a/documentation/providers/hostingde.md b/documentation/providers/hostingde.md index 4d145bb85..2446470e7 100644 --- a/documentation/providers/hostingde.md +++ b/documentation/providers/hostingde.md @@ -18,8 +18,9 @@ Example: ## Usage -An example `dnsconfig.js` configuration: +An example configuration: +{% code title="dnsconfig.js" %} ```javascript var REG_HOSTINGDE = NewRegistrar("hosting.de"); var DSP_HOSTINGDE = NewDnsProvider("hosting.de"); @@ -28,6 +29,7 @@ D("example.tld", REG_HOSTINGDE, DnsProvider(DSP_HOSTINGDE), A("test", "1.2.3.4") ); ``` +{% endcode %} ## Using this provider with http.net and others @@ -50,8 +52,9 @@ An example `creds.json` configuration: ``` {% endcode %} -An example `dnsconfig.js` configuration: +An example configuration: +{% code title="dnsconfig.js" %} ```javascript var REG_HTTPNET = NewRegistrar("http.net"); @@ -63,6 +66,7 @@ var DSP_HTTPNET = NewDnsProvider("http.net", { ], }); ``` +{% endcode %} #### Why this works diff --git a/documentation/providers/internetbs.md b/documentation/providers/internetbs.md index 6824345b8..3727da280 100644 --- a/documentation/providers/internetbs.md +++ b/documentation/providers/internetbs.md @@ -23,8 +23,9 @@ Example: This provider does not recognize any special metadata fields unique to Internet.bs. ## Usage -An example `dnsconfig.js` configuration: +An example configuration: +{% code title="dnsconfig.js" %} ```javascript var REG_INTERNETBS = NewRegistrar("internetbs"); @@ -33,6 +34,7 @@ D("example.com", REG_INTERNETBS, NAMESERVER("ns2.example.com."), ); ``` +{% endcode %} ## Activation diff --git a/documentation/providers/inwx.md b/documentation/providers/inwx.md index 1adf4bae7..78844cc02 100644 --- a/documentation/providers/inwx.md +++ b/documentation/providers/inwx.md @@ -101,6 +101,7 @@ An example `dnsconfig.js` configuration file for `example.tld` registered with INWX and delegated to Cloudflare: +{% code title="dnsconfig.js" %} ```javascript var REG_INWX = NewRegistrar("inwx"); var DSP_CF = NewDnsProvider("cloudflare"); @@ -109,3 +110,4 @@ D("example.tld", REG_INWX, DnsProvider(DSP_CF), A("test", "1.2.3.4") ); ``` +{% endcode %} diff --git a/documentation/providers/linode.md b/documentation/providers/linode.md index e0dce733c..784bcf0d2 100644 --- a/documentation/providers/linode.md +++ b/documentation/providers/linode.md @@ -20,8 +20,9 @@ Example: This provider does not recognize any special metadata fields unique to Linode. ## Usage -An example `dnsconfig.js` configuration: +An example configuration: +{% code title="dnsconfig.js" %} ```javascript var REG_NONE = NewRegistrar("none"); var DSP_LINODE = NewDnsProvider("linode"); @@ -30,6 +31,7 @@ D("example.tld", REG_NONE, DnsProvider(DSP_LINODE), A("test", "1.2.3.4") ); ``` +{% endcode %} ## Activation [Create Personal Access Token](https://cloud.linode.com/profile/tokens) diff --git a/documentation/providers/luadns.md b/documentation/providers/luadns.md index 345fc1d59..32d75d505 100644 --- a/documentation/providers/luadns.md +++ b/documentation/providers/luadns.md @@ -21,8 +21,9 @@ Example: This provider does not recognize any special metadata fields unique to LuaDNS. ## Usage -An example `dnsconfig.js` configuration: +An example configuration: +{% code title="dnsconfig.js" %} ```javascript var REG_NONE = NewRegistrar("none"); var DSP_LUADNS = NewDnsProvider("luadns"); @@ -31,6 +32,7 @@ D("example.tld", REG_NONE, DnsProvider(DSP_LUADNS), A("test", "1.2.3.4") ); ``` +{% endcode %} ## Activation [Create API key](https://api.luadns.com/api_keys). diff --git a/documentation/providers/msdns.md b/documentation/providers/msdns.md index 84c91a84a..8de161555 100644 --- a/documentation/providers/msdns.md +++ b/documentation/providers/msdns.md @@ -48,6 +48,7 @@ Example: An example DNS configuration: +{% code title="dnsconfig.js" %} ```javascript var REG_NONE = NewRegistrar("none"); var DSP_MSDNS = NewDnsProvider("msdns"); @@ -56,3 +57,4 @@ D("example.tld", REG_NONE, DnsProvider(DSP_MSDNS), A("test", "1.2.3.4") ) ``` +{% endcode %} diff --git a/documentation/providers/namecheap.md b/documentation/providers/namecheap.md index d62f24fd7..81b7ce02b 100644 --- a/documentation/providers/namecheap.md +++ b/documentation/providers/namecheap.md @@ -43,8 +43,9 @@ This provider does not recognize any special metadata fields unique to Namecheap. ## Usage -An example `dnsconfig.js` configuration: +An example configuration: +{% code title="dnsconfig.js" %} ```javascript var REG_NAMECHEAP = NewRegistrar("namecheap"); var DSP_BIND = NewDnsProvider("bind"); @@ -53,10 +54,12 @@ D("example.tld", REG_NAMECHEAP, DnsProvider(DSP_BIND), A("test", "1.2.3.4") ); ``` +{% endcode %} Namecheap provides custom redirect records URL, URL301, and FRAME. These records can be used like any other record: +{% code title="dnsconfig.js" %} ```javascript var REG_NAMECHEAP = NewRegistrar("namecheap"); var DSP_NAMECHEAP = NewDnsProvider("namecheap"); @@ -67,6 +70,7 @@ D("example.tld", REG_NAMECHEAP, DnsProvider(DSP_NAMECHEAP), URL301("backup", "http://backup.example.com/") ) ``` +{% endcode %} ## Activation In order to activate API functionality on your Namecheap account, you must diff --git a/documentation/providers/namedotcom.md b/documentation/providers/namedotcom.md index 408fcdd45..c8eb1ec01 100644 --- a/documentation/providers/namedotcom.md +++ b/documentation/providers/namedotcom.md @@ -38,6 +38,7 @@ This provider does not recognize any special metadata fields unique to name.com. An example `dnsconfig.js` configuration with NAMEDOTCOM as the registrar and DNS service provider: +{% code title="dnsconfig.js" %} ```javascript var REG_NAMECOM = NewRegistrar("name.com"); var DSP_NAMECOM = NewDnsProvider("name.com"); @@ -46,10 +47,12 @@ D("example.tld", REG_NAMECOM, DnsProvider(DSP_NAMECOM), A("test", "1.2.3.4") ); ``` +{% endcode %} An example `dnsconfig.js` configuration with NAMEDOTCOM as the registrar and DNS only, DNS hosted elsewhere: +{% code title="dnsconfig.js" %} ```javascript var REG_NAMECOM = NewRegistrar("name.com"); var DSP_R53 = NewDnsProvider("r53"); @@ -58,6 +61,7 @@ D("example.tld", REG_NAMECOM, DnsProvider(DSP_R53), A("test","1.2.3.4") ); ``` +{% endcode %} {% hint style="info" %} **NOTE**: name.com does not allow control over the NS records of your zones via the api. It is not recommended to use name.com's dns provider unless it is your only dns host. diff --git a/documentation/providers/netcup.md b/documentation/providers/netcup.md index 99382f165..280cbb5cd 100644 --- a/documentation/providers/netcup.md +++ b/documentation/providers/netcup.md @@ -19,8 +19,9 @@ Example: {% endcode %} ## Usage -An example `dnsconfig.js` configuration: +An example configuration: +{% code title="dnsconfig.js" %} ```javascript var REG_NONE = NewRegistrar("none"); var DSP_NETCUP = NewDnsProvider("netcup"); @@ -29,7 +30,7 @@ D("example.tld", REG_NONE, DnsProvider(DSP_NETCUP), A("test", "1.2.3.4") ); ``` - +{% endcode %} ## Caveats Netcup does not allow any TTLs to be set for individual records. Thus in diff --git a/documentation/providers/netlify.md b/documentation/providers/netlify.md index 7d2298c6e..9974cbd77 100644 --- a/documentation/providers/netlify.md +++ b/documentation/providers/netlify.md @@ -22,8 +22,9 @@ Examples: This provider does not recognize any special metadata fields unique to Netlify. ## Usage -An example `dnsconfig.js` configuration: +An example configuration: +{% code title="dnsconfig.js" %} ```javascript var REG_NETLIFY = NewRegistrar("netlify"); var DSP_NETLIFY = NewDnsProvider("netlify"); @@ -32,6 +33,7 @@ D("example.tld", REG_NETLIFY, DnsProvider(DSP_NETLIFY), A("test", "1.2.3.4") ); ``` +{% endcode %} ## Activation DNSControl depends on a Netlify account personal access token. diff --git a/documentation/providers/ns1.md b/documentation/providers/ns1.md index 23d01f9f5..69f6d4031 100644 --- a/documentation/providers/ns1.md +++ b/documentation/providers/ns1.md @@ -20,8 +20,9 @@ Example: This provider does not recognize any special metadata fields unique to NS1. ## Usage -An example `dnsconfig.js` configuration: +An example configuration: +{% code title="dnsconfig.js" %} ```javascript var REG_NONE = NewRegistrar("none"); var DSP_NS1 = NewDnsProvider("ns1"); @@ -30,4 +31,4 @@ D("example.tld", REG_NONE, DnsProvider(DSP_NS1), A("test", "1.2.3.4") ); ``` - +{% endcode %} diff --git a/documentation/providers/oracle.md b/documentation/providers/oracle.md index 4576810b8..b4a21f61b 100644 --- a/documentation/providers/oracle.md +++ b/documentation/providers/oracle.md @@ -28,8 +28,9 @@ Example: This provider does not recognize any special metadata fields unique to Oracle Cloud. ## Usage -An example `dnsconfig.js` configuration: +An example configuration: +{% code title="dnsconfig.js" %} ```javascript var REG_NONE = NewRegistrar("none"); var DSP_ORACLE = NewDnsProvider("oracle"); @@ -40,4 +41,4 @@ D("example.tld", REG_NONE, DnsProvider(DSP_ORACLE), A("test", "1.2.3.4") ); ``` - +{% endcode %} diff --git a/documentation/providers/ovh.md b/documentation/providers/ovh.md index 550a6f9cc..4c5942a21 100644 --- a/documentation/providers/ovh.md +++ b/documentation/providers/ovh.md @@ -26,8 +26,9 @@ This provider does not recognize any special metadata fields unique to OVH. ## Usage -An example `dnsconfig.js` configuration: (DNS hosted with OVH): +An example configuration: (DNS hosted with OVH): +{% code title="dnsconfig.js" %} ```javascript var REG_OVH = NewRegistrar("ovh"); var DSP_OVH = NewDnsProvider("ovh"); @@ -36,9 +37,11 @@ D("example.tld", REG_OVH, DnsProvider(DSP_OVH), A("test", "1.2.3.4") ); ``` +{% endcode %} -An example `dnsconfig.js` configuration: (Registrar only. DNS hosted elsewhere) +An example configuration: (Registrar only. DNS hosted elsewhere) +{% code title="dnsconfig.js" %} ```javascript var REG_OVH = NewRegistrar("ovh"); var DSP_R53 = NewDnsProvider("r53"); @@ -47,7 +50,7 @@ D("example.tld", REG_OVH, DnsProvider(DSP_R53), A("test", "1.2.3.4") ); ``` - +{% endcode %} ## Activation diff --git a/documentation/providers/packetframe.md b/documentation/providers/packetframe.md index 6bff718f8..9bbdb74a6 100644 --- a/documentation/providers/packetframe.md +++ b/documentation/providers/packetframe.md @@ -20,8 +20,9 @@ Example: This provider does not recognize any special metadata fields unique to Packetframe. ## Usage -An example `dnsconfig.js` configuration: +An example configuration: +{% code title="dnsconfig.js" %} ```javascript var REG_NONE = NewRegistrar("none"); var DSP_PACKETFRAME = NewDnsProvider("packetframe"); @@ -30,3 +31,4 @@ D("example.tld", REG_NONE, DnsProvider(DSP_PACKETFRAME), A("test", "1.2.3.4") ); ``` +{% endcode %} diff --git a/documentation/providers/porkbun.md b/documentation/providers/porkbun.md index d2713ae43..4ca40fb8e 100644 --- a/documentation/providers/porkbun.md +++ b/documentation/providers/porkbun.md @@ -23,8 +23,9 @@ This provider does not recognize any special metadata fields unique to Porkbun. ## Usage -An example `dnsconfig.js` configuration: +An example configuration: +{% code title="dnsconfig.js" %} ```javascript var REG_NONE = NewRegistrar("none"); var DSP_PORKBUN = NewDnsProvider("porkbun"); @@ -33,3 +34,4 @@ D("example.tld", REG_NONE, DnsProvider(DSP_PORKBUN), A("test", "1.2.3.4") ); ``` +{% endcode %} diff --git a/documentation/providers/powerdns.md b/documentation/providers/powerdns.md index abc30cc30..beaa9b40b 100644 --- a/documentation/providers/powerdns.md +++ b/documentation/providers/powerdns.md @@ -22,6 +22,7 @@ Example: ## Metadata Following metadata are available: +{% code title="dnsconfig.js" %} ```javascript { 'default_ns': [ @@ -31,13 +32,15 @@ Following metadata are available: 'dnssec_on_create': false } ``` +{% endcode %} - `default_ns` sets the nameserver which are used - `dnssec_on_create` specifies if DNSSEC should be enabled when creating zones ## Usage -An example `dnsconfig.js` configuration: +An example configuration: +{% code title="dnsconfig.js" %} ```javascript var REG_NONE = NewRegistrar("none"); var DSP_POWERDNS = NewDnsProvider("powerdns"); @@ -46,6 +49,7 @@ D("example.tld", REG_NONE, DnsProvider(DSP_POWERDNS), A("test", "1.2.3.4") ); ``` +{% endcode %} ## Activation See the [PowerDNS documentation](https://doc.powerdns.com/authoritative/http-api/index.html) how the API can be enabled. diff --git a/documentation/providers/route53.md b/documentation/providers/route53.md index 0d93e7b6f..805f724fb 100644 --- a/documentation/providers/route53.md +++ b/documentation/providers/route53.md @@ -65,8 +65,9 @@ You can find some other ways to authenticate to Route53 in the [go sdk configura This provider does not recognize any special metadata fields unique to route 53. ## Usage -An example `dnsconfig.js` configuration: +An example configuration: +{% code title="dnsconfig.js" %} ```javascript var REG_NONE = NewRegistrar("none"); var DSP_R53 = NewDnsProvider("r53_main"); @@ -75,6 +76,7 @@ D("example.tld", REG_NONE, DnsProvider(DSP_R53), A("test", "1.2.3.4") ); ``` +{% endcode %} ## Activation DNSControl depends on a standard [AWS access key](https://aws.amazon.com/developers/access-keys/) with permission to list, create and update hosted zones. If you do not have the permissions required you will receive the following error message `Check your credentials, your not authorized to perform actions on Route 53 AWS Service`. diff --git a/documentation/providers/rwth.md b/documentation/providers/rwth.md index 46b90204d..dc38fcddc 100644 --- a/documentation/providers/rwth.md +++ b/documentation/providers/rwth.md @@ -20,8 +20,9 @@ Example: This provider does not recognize any special metadata fields unique to it. ## Usage -An example `dnsconfig.js` configuration: +An example configuration: +{% code title="dnsconfig.js" %} ```javascript var REG_NONE = NewRegistrar("none"); var DSP_RWTH = NewDnsProvider("rwth"); @@ -30,6 +31,7 @@ D("example.rwth-aachen.de", REG_NONE, DnsProvider(DSP_RWTH), A("test", "1.2.3.4") ); ``` +{% endcode %} ## Caveats The default TTL is not automatically fetched, as the API does not provide such an endpoint. diff --git a/documentation/providers/softlayer.md b/documentation/providers/softlayer.md index ed204b6f6..645a85722 100644 --- a/documentation/providers/softlayer.md +++ b/documentation/providers/softlayer.md @@ -28,8 +28,9 @@ To maintain compatibility with existing softlayer CLI services these can also be ## Usage -An example `dnsconfig.js` configuration: +An example configuration: +{% code title="dnsconfig.js" %} ```javascript var REG_NONE = NewRegistrar("none"); // no registrar var DSP_SOFTLAYER = NewDnsProvider("softlayer"); @@ -38,11 +39,13 @@ D("example.tld", registrary, DnsProvider(DSP_SOFTLAYER), A("test", "1.2.3.4") ); ``` +{% endcode %} ## Metadata This provider does not recognize any special metadata fields unique to SoftLayer dns. For compatibility with the pre-generated NAMESERVER fields it's recommended to set the NS TTL to 86400 such as: +{% code title="dnsconfig.js" %} ```javascript D("example.tld", REG_NONE, DnsProvider(SOFTLAYER), NAMESERVER_TTL(86400), @@ -50,3 +53,4 @@ D("example.tld", REG_NONE, DnsProvider(SOFTLAYER), A("test", "1.2.3.4") ); ``` +{% endcode %} diff --git a/documentation/providers/transip.md b/documentation/providers/transip.md index 2ce3a2e14..b976eedb9 100644 --- a/documentation/providers/transip.md +++ b/documentation/providers/transip.md @@ -43,8 +43,9 @@ This provider does not recognize any special metadata fields unique to TransIP. ## Usage -An example `dnsconfig.js` configuration: +An example configuration: +{% code title="dnsconfig.js" %} ```javascript var DSP_TRANSIP = NewDnsProvider("transip"); @@ -52,6 +53,7 @@ D("example.tld", REG_DNSIMPLE, DnsProvider(DSP_TRANSIP), A("test", "1.2.3.4") ); ``` +{% endcode %} ## Activation diff --git a/documentation/providers/vultr.md b/documentation/providers/vultr.md index db0068711..8ff2b9c03 100644 --- a/documentation/providers/vultr.md +++ b/documentation/providers/vultr.md @@ -22,8 +22,9 @@ This provider does not recognize any special metadata fields unique to Vultr. ## Usage -An example `dnsconfig.js` configuration: +An example configuration: +{% code title="dnsconfig.js" %} ```javascript var DSP_VULTR = NewDnsProvider("vultr"); @@ -31,6 +32,7 @@ D("example.tld", REG_DNSIMPLE, DnsProvider(DSP_VULTR), A("test", "1.2.3.4") ); ``` +{% endcode %} ## Activation