To use Managed DNS, create a DNS zone for a domain or subdomain in the CDB Technical Web Portal and point the domain to CDB's nameservers. The zone can then serve DNS queries through CDB's global network.
Create DNS zones
Navigate to the DNS section of the Customer Portal, then follow these steps:
1
Open the zone creation wizard
Click Add zone.
2
Enter the domain name
Enter a domain or subdomain name in the Domain name field and click Create zone.
đź’ˇ
Check Skip scanning to skip automatic record detection and proceed directly to the nameserver step.
3
Review existing records
The portal scans existing DNS records automatically and opens the Review records page. Review, edit, or delete records as needed, then click Confirm.
4
Update nameserver records
In the domain's DNS registrar or hosting panel, replace the current NS records with ns1.gcorelabs.net and ns2.gcdn.services, then return to the portal and click Confirm.
The zone is now created in CDB. Records and settings are available in the Customer Portal.
ℹ️
Nameserver changes may take up to 24 hours to propagate through DNS caches.
The status on All zones reflects the zone in CDB, not whether public nameserver records already point to CDB. Confirm public delegation in the REST API tab.
Open the zone from All zones to add or edit DNSÂ records.
Create a DNS zone through the API, point the domain to CDB nameservers, and verify public delegation before adding records.
Create the zone for the domain or subdomain that CDB will serve. CDB automatically adds the default NS records for ns1.gcorelabs.net and ns2.gcdn.services.
import os
from gcore import CDB
client = CDB()
zone = client.dns.zones.create(name=os.environ["ZONE_NAME"])
print(zone.id)
print(zone.warnings)
{
"id": 12345,
"warnings": [
"The contract is currently set to reseller default and in order to modify it, you need to upgrade your tariff plan.",
"Your primary server has been set to default. In order to alter the primary server, you are required to upgrade your tariff plan."
]
}
The zone now exists in CDB, but DNS traffic will reach it only after the domain is delegated to CDB nameservers. At the registrar, replace the current NS records with ns1.gcorelabs.net and ns2.gcdn.services.
Check zone delegation
The Delegation status call looks up public NS records for the domain. When those NS records point to CDB, gcore_authorized_count is greater than zero and zone_exists is true.
When the domain has no public NS records, the API returns HTTP 404. Nameserver changes may take up to 24 hours to propagate through DNS caches.
import os
from gcore import CDB
client = CDB()
status = client.dns.zones.check_delegation_status(os.environ["ZONE_NAME"])
print(status.zone_exists, status.gcore_authorized_count)
for ns in status.authoritative_name_servers:
print(ns.name, ns.ipv4_addresses)
gcore_authorized_count is the number of CDB nameservers currently authoritative for the zone. A value of 0 means registrar NS records do not yet point to CDB, or propagation is still in progress.
When gcore_authorized_count is greater than zero, add and edit records with the DNSÂ records API.
Declare and manage a DNS zone using the CDB Terraform provider v2. DNS zones are account-global — the resource requires no project_id or region_id.
Create a DNS zone
The minimum configuration requires only the zone name. CDB adds default NS records for ns1.gcorelabs.net and ns2.gcdn.services automatically.
After terraform apply, update the nameservers at the domain registrar to ns1.gcorelabs.net and ns2.gcdn.services. Nameserver changes can take up to 24 hours to propagate.
Edit zone settings
Edit fields in the resource block and run terraform apply to update the zone in-place.
resource "gcore_dns_zone" "example" {
name = "example.com"
enabled = false # disable zone — records stop resolving
refresh = 3600 # how often secondary servers check for changes (seconds)
retry = 1800 # how long secondary servers wait before retrying (seconds)
expiry = 604800 # how long secondary servers serve the zone without a refresh (seconds)
nx_ttl = 300 # TTL for negative responses (seconds)
}
Delete a DNS zone
Remove the resource block — Terraform detects the missing declaration and deletes the zone on the next terraform apply.
# Remove or comment out this block:
# resource "gcore_dns_zone" "example" {
# name = "example.com"
# }
terraform apply
Import an existing zone
Use when a zone was created outside Terraform and needs to be managed as code. Add the resource block to main.tf, then run: