2021-03-09 08:25:55 +08:00
## Configuration
2022-02-18 01:22:31 +08:00
2022-05-09 02:41:33 +08:00
To use this provider, add an entry to `creds.json` with `TYPE` set to `HOSTINGDE`
along with your [`authToken` and optionally an `ownerAccountId` ](https://www.hosting.de/api/#requests-and-authentication ).
2021-03-09 08:25:55 +08:00
2022-05-09 02:41:33 +08:00
Example:
2021-03-09 08:25:55 +08:00
2023-03-03 05:17:27 +08:00
{% code title="creds.json" %}
2022-02-18 01:22:31 +08:00
```json
2021-03-09 08:25:55 +08:00
{
"hosting.de": {
2022-05-09 02:41:33 +08:00
"TYPE": "HOSTINGDE",
2021-03-09 08:25:55 +08:00
"authToken": "YOUR_API_KEY"
}
}
2022-02-18 01:22:31 +08:00
```
2023-03-03 05:17:27 +08:00
{% endcode %}
2021-03-09 08:25:55 +08:00
## Usage
2022-02-18 01:22:31 +08:00
2023-03-11 21:42:01 +08:00
An example configuration:
2021-03-09 08:25:55 +08:00
2023-03-11 21:42:01 +08:00
{% code title="dnsconfig.js" %}
2023-01-20 20:56:20 +08:00
```javascript
2022-05-09 02:41:33 +08:00
var REG_HOSTINGDE = NewRegistrar("hosting.de");
var DSP_HOSTINGDE = NewDnsProvider("hosting.de");
2021-03-09 08:25:55 +08:00
2022-05-09 02:41:33 +08:00
D("example.tld", REG_HOSTINGDE, DnsProvider(DSP_HOSTINGDE),
A("test", "1.2.3.4")
2021-03-09 08:25:55 +08:00
);
2022-02-18 01:22:31 +08:00
```
2023-03-11 21:42:01 +08:00
{% endcode %}
2022-02-18 01:22:31 +08:00
2022-02-22 23:54:02 +08:00
## Using this provider with http.net and others
2022-02-18 01:22:31 +08:00
2022-02-22 23:54:02 +08:00
http.net and other DNS service providers use an API that is compatible with hosting.de's API.
Using them requires setting the `baseURL` and (optionally) overriding the default nameservers.
2022-02-18 01:22:31 +08:00
2022-02-22 23:54:02 +08:00
### Example http.net configuration
2022-05-09 02:41:33 +08:00
An example `creds.json` configuration:
2022-02-22 23:54:02 +08:00
2023-03-03 05:17:27 +08:00
{% code title="creds.json" %}
2022-02-22 23:54:02 +08:00
```json
{
"http.net": {
2022-05-09 02:41:33 +08:00
"TYPE": "HOSTINGDE",
2022-02-22 23:54:02 +08:00
"authToken": "YOUR_API_KEY",
"baseURL": "https://partner.http.net"
}
}
```
2023-03-03 05:17:27 +08:00
{% endcode %}
2022-02-22 23:54:02 +08:00
2023-03-11 21:42:01 +08:00
An example configuration:
2022-02-18 01:22:31 +08:00
2023-03-11 21:42:01 +08:00
{% code title="dnsconfig.js" %}
2023-01-20 20:56:20 +08:00
```javascript
2022-05-09 02:41:33 +08:00
var REG_HTTPNET = NewRegistrar("http.net");
2022-02-22 23:54:02 +08:00
2022-09-16 22:51:05 +08:00
var DSP_HTTPNET = NewDnsProvider("http.net", {
"default_ns": [
2022-05-09 02:41:33 +08:00
"ns1.routing.net.",
"ns2.routing.net.",
"ns3.routing.net.",
2022-02-18 01:22:31 +08:00
],
});
```
2023-03-11 21:42:01 +08:00
{% endcode %}
2022-02-22 23:54:02 +08:00
#### Why this works
hosting.de has the concept of _nameserver sets_ but this provider does not implement it.
The `HOSTINGDE` provider **ignores the default nameserver set** defined in your account to avoid unintentional changes and consolidate the full configuration in DNSControl.
Instead, it uses hosting.de's nameservers (`ns1.hosting.de.`, `ns2.hosting.de.` , and `ns3.hosting.de.` ) by default, regardless of your account settings.
Using the `default_ns` metadata, the default nameserver set can be overwritten.