Domains and DNS
Customers can register domain names and host DNS zones on your nameservers. Domains are registered through Openprovider or by hand. DNS zones are hosted on PowerDNS. Only staff with the owner or admin role can change these settings.
Registrar#
Open Domains in the Hosting group. The Registrar card has these fields:
| Field | Rules and meaning |
|---|---|
| Registrar | Manual (process registrations yourself) or Openprovider. Default: manual. |
| Renew days before expiry | 1 to 120. Default: 30. Stacklane renews domains with auto-renew this many days before they expire. |
| API endpoint | Openprovider only. Must start with https://. Default: https://api.openprovider.eu. |
| Username | Openprovider only. Required. |
| Password | Openprovider only. Stored encrypted. Leave it empty to keep the current one. When you change the endpoint or the username, you must enter the password again. |
| Default nameservers | Zero, or two to six host names, separated by commas. Each host name must have at least three labels, for example ns1.example.net. New registrations use these nameservers when the customer does not enter others. |
Click Save.
Openprovider#
With Openprovider, Stacklane:
- checks availability for domain searches;
- registers the domain right away;
- renews domains;
- sends nameserver changes to Openprovider.
Stacklane registers each domain with auto-renew turned off at Openprovider, because Stacklane handles renewals itself. The same contact handle is used as owner, admin, tech and billing contact.
For the first registration of an organization, Stacklane creates a customer contact at Openprovider from the organization details. It saves the contact handle and uses it for later registrations. The organization needs:
- a phone number in international format, for example
+31 20 123 4567; - an address with the house number at the end of the first address line, for example
Herengracht 100; - a postal code, a city and a country.
If something is missing, the registration fails with "contact details are incomplete" and the customer gets the money back as credit.
Manual registrar#
With the manual registrar, Stacklane does not contact any registrar.
- Domain searches show the price, but availability as On request.
- A registration stays Registering (status
pending) until a staff member marks it as registered. - Renewals from credit only move the expiry date in Stacklane.
- Nameserver changes are only saved in Stacklane.
You make all registrations, renewals and nameserver changes at your registrar yourself.
To finish a manual registration:
- Register the domain at your registrar.
- Open Domains in the back office. The card All domains lists the domains of all organizations.
- Click Mark as registered next to the domain.
The portal sets the expiry date to one year from now. Through the API you can set another expiry date and the registrar's ID for the domain:
curl -X POST https://panel.example.com/api/admin/domains/domains/<domain-id>/activate \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H 'Content-Type: application/json' \
-d '{"expires_at": 1830297600, "remote_id": "12345678"}'
expires_at is a Unix time in seconds and must be in the future. Only domains with the status pending can be activated. Staff with the support role can also do this.
Extensions and prices#
The card Extensions and prices lists the extensions customers can register. Click Add extension.
| Field | Rules and meaning |
|---|---|
| Extension | For example com, nl or co.uk, without the leading dot. Up to 24 characters. |
| Registration price | The price for one year of registration, 0 to 100,000.00. |
| Renewal price | The price for one year of renewal, 0 to 100,000.00. |
| Currency | Must be the billing currency. |
| Status | active or disabled. Customers can only register active extensions. |
Stacklane splits a domain name at the first dot. In shop.co.uk the extension is co.uk.
When a customer searches, Stacklane shows up to eight results: first the extension the customer typed (if it has a price), then other active extensions.
How customers pay for domains#
Domains are paid from the credit balance, not on the monthly invoice.
- Registration. The price is the registration price times the number of years (1 to 10). Stacklane takes the amount from the credit balance when the customer orders. If the balance is too low, the order fails with
402and the codeinsufficient_credit. - Renewal. Once an hour, Stacklane looks for active domains with auto-renew that expire within Renew days before expiry. It takes the renewal price for one year from the credit balance and renews the domain. If the balance is too low, it skips the domain and tries again in the next hour.
- Refunds. When a registration or renewal fails at the registrar, Stacklane puts the amount back on the credit balance.
Only users with the administrator or billing role can register domains. Customers turn auto-renew on or off per domain.
Domain statuses#
| Status | Meaning |
|---|---|
pending | The registration is in progress, or waits for a staff member with the manual registrar. |
active | The domain is registered. |
expired | The expiry date has passed. Stacklane checks this every hour. The customer must contact support. |
failed | The registration failed. The amount was refunded. |
cancelled | The order was stopped because of too little credit. |
DNS hosting#
Open DNS hosting in the Hosting group.
| Field | Rules and meaning |
|---|---|
| DNS server | Disabled or PowerDNS. Default: disabled. When DNS hosting is disabled, customers cannot add or change zones. |
| PowerDNS API URL | The address of the PowerDNS HTTP API, for example http://10.0.0.53:8081. |
| Server ID | The PowerDNS server ID. Default: localhost. |
| API key | The PowerDNS API key. Stored encrypted. Leave it empty to keep the current key. When you change the URL to another host, you must enter the key again. |
| Verify TLS | On by default. |
| Nameservers | At least two host names, for example ns1.example.net and ns2.example.net. Required for PowerDNS. |
| Zones per organization | 0 to 10,000. Default: 50. |
How Stacklane uses PowerDNS#
Stacklane calls the PowerDNS API under <API URL>/api/v1/servers/<server ID>/ with the header X-API-Key.
- A new zone is created with the kind
Native,soa_edit_apiset toDEFAULT, and NS records for your nameservers. - Record changes replace the full record set of a name and type.
- Deleting a zone deletes it in PowerDNS.
PowerDNS must serve the zones on the nameservers you enter. Customers see these nameservers on the zone page with the text "Point the domain to these nameservers".
Zone rules#
- A zone name must be a valid domain name.
- A zone exists only once on the platform.
- When a domain is registered in Stacklane by one organization, other organizations cannot add a zone for it.
- An organization can have at most Zones per organization zones. When it reaches the limit, it gets the error
zone_limit.
Customers can use the record types A, AAAA, CNAME, MX, TXT, NS, SRV and CAA. See Customer portal.
API endpoints#
| Method | Path | Staff roles | Description |
|---|---|---|---|
GET, PUT | /api/admin/domains/settings | owner, admin | Read or save the registrar settings. |
GET | /api/admin/domains/tlds | owner, admin | List extensions and prices. |
PUT, DELETE | /api/admin/domains/tlds/{tld} | owner, admin | Save or remove an extension. Body for PUT: {"register_cents": 999, "renew_cents": 1299, "currency": "EUR", "status": "active"}. |
GET | /api/admin/domains/domains | owner, admin, support | List the domains of all organizations. |
POST | /api/admin/domains/domains/{id}/activate | owner, admin, support | Mark a pending domain as registered. |
GET, PUT | /api/admin/dns/settings | owner, admin | Read or save the DNS hosting settings. |
Example body for PUT /api/admin/dns/settings:
{
"provider": "powerdns",
"endpoint": "http://10.0.0.53:8081",
"server": "localhost",
"api_key": "<PowerDNS API key>",
"verify_tls": true,
"nameservers": ["ns1.example.net", "ns2.example.net"],
"max_zones": 50
}
Free subdomains for game servers#
You can give customers a free address for their game server, for example survival.play.example.net.
- Open DNS in the Hosting group of the back office.
- Set Game server zone to a zone on your PowerDNS server, for example
play.example.net. If the zone does not exist yet, Stacklane creates it with your nameservers the first time a customer claims a name. - Save.
A customer then picks a name of 3 to 32 letters, numbers and dashes on the Minecraft tab. Stacklane creates:
| Record | Value |
|---|---|
A (or AAAA) for the name | The IP address of the primary port of the server. |
SRV for _minecraft._tcp.<name> | 0 5 <port> <name>. |
If the primary port only has an alias host name, the SRV record points to that host name instead. Players can then connect without typing a port. Names such as www, mail, api and panel are reserved. Stacklane removes the records when the customer removes the name or cancels the service.