DNS Yönetimi
Bir alan adının DNS kayıtlarını, alt ad sunucularını ve DNSSEC imzalarını yöneten on bir uç.
Genel Bakış
Bu on bir uç alan adının ad çözümlemesini yönetir: hangi adın nereye çıktığı, alan adının kendi ad sunucuları ve imza doğrulaması.
Üç ayrı iş bir arada durur. Alt ad sunucuları alan adının kendi sunucularını tanımlar. DNS kayıtları hangi adın nereye gittiğini yazar. DNSSEC bu cevapların imzalı olmasını sağlar.
Hiçbirinde yerel kopya tutulmaz: her okuma tescil kuruluşuna gider ve her yazma anında yayına yansır.
Referans
Alt Ad Sunucularını Listeleme
Alan adının kendi altında tanımlanmış ad sunucularını döndürür.
curl 'https://panel.ornek.com/api/v1/admin/services/520/domain/child-nameservers' \
-H "Authorization: Bearer $API_KEY"const res = await fetch('https://panel.ornek.com/api/v1/admin/services/520/domain/child-nameservers', {
headers: { Authorization: `Bearer ${apiKey}` },
});
const body = await res.json();$ch = curl_init('https://panel.ornek.com/api/v1/admin/services/520/domain/child-nameservers');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . $apiKey],
]);
$body = json_decode(curl_exec($ch), true);
curl_close($ch);// Modul listelemeyi desteklemiyorsa YEREL kopya doner; tescildeki gercekle ayrisabilir.
$response = Api::Services()->GetDomainChildNameservers(['id' => 520]);Alt Ad Sunucusu Ekleme
Alan adının altında yeni bir ad sunucusu tanımlar.
201 ile döner.curl -X POST 'https://panel.ornek.com/api/v1/admin/services/520/domain/child-nameservers' \
-H "Authorization: Bearer $API_KEY" \
-H 'Content-Type: application/json' \
-d '{"ns":"ns1.example.com","ip":"203.0.113.10"}'const res = await fetch('https://panel.ornek.com/api/v1/admin/services/520/domain/child-nameservers', {
method: 'POST',
headers: {
Authorization: `Bearer ${apiKey}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({ ns: 'ns1.example.com', ip: '203.0.113.10' }),
});
const body = await res.json();$ch = curl_init('https://panel.ornek.com/api/v1/admin/services/520/domain/child-nameservers');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . $apiKey,
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode([
'ns' => 'ns1.example.com',
'ip' => '203.0.113.10',
]),
]);
$body = json_decode(curl_exec($ch), true);
curl_close($ch);// Alt ad sunucusu tanimlamak onu KULLANMAYA baslamaz; ayrica ad sunucusu olarak atayin.
Api::Services()->AddDomainChildNameserver([
'id' => 520,
'ns' => 'ns1.example.com',
'ip' => '203.0.113.10',
]);
Api::Services()->SetDomainNameservers([
'id' => 520,
'ns1' => 'ns1.example.com',
'ns2' => 'ns2.example.com',
]);Alt Ad Sunucusunu Güncelleme
Var olan bir alt ad sunucusunu bulup yeni değerlerle değiştirir.
curl -X PUT 'https://panel.ornek.com/api/v1/admin/services/520/domain/child-nameservers' \
-H "Authorization: Bearer $API_KEY" \
-H 'Content-Type: application/json' \
-d '{"old_ns":"ns1.example.com","old_ip":"203.0.113.10","new_ns":"ns1.example.com","new_ip":"203.0.113.20"}'const res = await fetch('https://panel.ornek.com/api/v1/admin/services/520/domain/child-nameservers', {
method: 'PUT',
headers: {
Authorization: `Bearer ${apiKey}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
old_ns: 'ns1.example.com',
old_ip: '203.0.113.10',
new_ns: 'ns1.example.com',
new_ip: '203.0.113.20',
}),
});
const body = await res.json();$ch = curl_init('https://panel.ornek.com/api/v1/admin/services/520/domain/child-nameservers');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'PUT',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . $apiKey,
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode([
'old_ns' => 'ns1.example.com',
'old_ip' => '203.0.113.10',
'new_ns' => 'ns1.example.com',
'new_ip' => '203.0.113.20',
]),
]);
$body = json_decode(curl_exec($ch), true);
curl_close($ch);// Kayit KIMLIKLE degil eski degeriyle bulunur: eski adi dogru yazmazsaniz eslesme olmaz.
Api::Services()->UpdateDomainChildNameserver([
'id' => 520,
'old_ns' => 'ns1.example.com',
'old_ip' => '203.0.113.10',
'new_ns' => 'ns1.example.com',
'new_ip' => '203.0.113.20',
]);Alt Ad Sunucusunu Silme
Bir alt ad sunucusu tanımını kaldırır.
curl -X DELETE 'https://panel.ornek.com/api/v1/admin/services/520/domain/child-nameservers' \
-H "Authorization: Bearer $API_KEY" \
-H 'Content-Type: application/json' \
-d '{"ns":"ns1.example.com"}'const res = await fetch('https://panel.ornek.com/api/v1/admin/services/520/domain/child-nameservers', {
method: 'DELETE',
headers: {
Authorization: `Bearer ${apiKey}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({ ns: 'ns1.example.com' }),
});
const body = await res.json();$ch = curl_init('https://panel.ornek.com/api/v1/admin/services/520/domain/child-nameservers');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . $apiKey,
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode(['ns' => 'ns1.example.com']),
]);
$body = json_decode(curl_exec($ch), true);
curl_close($ch);// Kullanimda olan bir alt ad sunucusunu silmek alan adini erisilemez birakabilir.
Api::Services()->DeleteDomainChildNameserver(['id' => 520, 'ns' => 'ns1.example.com']);DNS Kayıtlarını Listeleme
Alan adının DNS kayıtlarını döndürür. Yerel bir kopya tutulmaz.
curl 'https://panel.ornek.com/api/v1/admin/services/520/domain/dns-records' \
-H "Authorization: Bearer $API_KEY"const res = await fetch('https://panel.ornek.com/api/v1/admin/services/520/domain/dns-records', {
headers: { Authorization: `Bearer ${apiKey}` },
});
const body = await res.json();$ch = curl_init('https://panel.ornek.com/api/v1/admin/services/520/domain/dns-records');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . $apiKey],
]);
$body = json_decode(curl_exec($ch), true);
curl_close($ch);// Guncelleme ve silme icin gereken 'identity' BURADAN gelir; baska yerde uretilemez.
$records = Api::Services()->GetDomainDnsRecords(['id' => 520])['data'];
$www = current(array_filter($records, fn (array $r): bool => $r['name'] === 'www'));{
"data": [
{
"identity": "1001",
"type": "A",
"name": "@",
"value": "203.0.113.10",
"ttl": 3600,
"priority": 0
}
]
}DNS Kaydı Ekleme
Alan adına yeni bir DNS kaydı ekler.
201 ile döner.added alanına güvenmeyin.curl -X POST 'https://panel.ornek.com/api/v1/admin/services/520/domain/dns-records' \
-H "Authorization: Bearer $API_KEY" \
-H 'Content-Type: application/json' \
-d '{"type":"A","name":"www","value":"203.0.113.10","ttl":3600}'const res = await fetch('https://panel.ornek.com/api/v1/admin/services/520/domain/dns-records', {
method: 'POST',
headers: {
Authorization: `Bearer ${apiKey}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
type: 'A',
name: 'www',
value: '203.0.113.10',
ttl: 3600,
}),
});
const body = await res.json();$ch = curl_init('https://panel.ornek.com/api/v1/admin/services/520/domain/dns-records');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . $apiKey,
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode([
'type' => 'A',
'name' => 'www',
'value' => '203.0.113.10',
'ttl' => 3600,
]),
]);
$body = json_decode(curl_exec($ch), true);
curl_close($ch);// Yanit eklenen kaydi TASIMAYABILIR; kimligi ogrenmek icin listeyi yeniden okuyun.
Api::Services()->AddDomainDnsRecord([
'id' => 520,
'type' => 'A',
'name' => 'www',
'value' => '203.0.113.10',
]);
$records = Api::Services()->GetDomainDnsRecords(['id' => 520])['data'];DNS Kaydını Güncelleme
Var olan bir DNS kaydını değiştirir. Modül güncellemeyi sunmuyorsa çalışmaz.
updated alanına güvenmeyin.curl -X PUT 'https://panel.ornek.com/api/v1/admin/services/520/domain/dns-records' \
-H "Authorization: Bearer $API_KEY" \
-H 'Content-Type: application/json' \
-d '{"type":"A","name":"www","value":"203.0.113.20","identity":"1001"}'const res = await fetch('https://panel.ornek.com/api/v1/admin/services/520/domain/dns-records', {
method: 'PUT',
headers: {
Authorization: `Bearer ${apiKey}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
type: 'A',
name: 'www',
value: '203.0.113.20',
identity: '1001',
}),
});
const body = await res.json();$ch = curl_init('https://panel.ornek.com/api/v1/admin/services/520/domain/dns-records');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'PUT',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . $apiKey,
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode([
'type' => 'A',
'name' => 'www',
'value' => '203.0.113.20',
'identity' => '1001',
]),
]);
$body = json_decode(curl_exec($ch), true);
curl_close($ch);// Modul guncellemeyi sunmuyorsa 'not_supported' doner; o zaman sil-ve-ekle yapin.
$response = Api::Services()->UpdateDomainDnsRecord([
'id' => 520,
'type' => 'A',
'name' => 'www',
'value' => '203.0.113.20',
'identity' => '1001',
]);DNS Kaydını Silme
Bir DNS kaydını kaldırır.
curl -X DELETE 'https://panel.ornek.com/api/v1/admin/services/520/domain/dns-records' \
-H "Authorization: Bearer $API_KEY" \
-H 'Content-Type: application/json' \
-d '{"type":"A","name":"www","identity":"1001"}'const res = await fetch('https://panel.ornek.com/api/v1/admin/services/520/domain/dns-records', {
method: 'DELETE',
headers: {
Authorization: `Bearer ${apiKey}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({ type: 'A', name: 'www', identity: '1001' }),
});
const body = await res.json();$ch = curl_init('https://panel.ornek.com/api/v1/admin/services/520/domain/dns-records');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . $apiKey,
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode([
'type' => 'A',
'name' => 'www',
'identity' => '1001',
]),
]);
$body = json_decode(curl_exec($ch), true);
curl_close($ch);// Yalniz tip gondermek AYNI TIPTEKI baska kayitlari da eleyebilir; kimligi de verin.
Api::Services()->DeleteDomainDnsRecord([
'id' => 520,
'type' => 'A',
'name' => 'www',
'identity' => '1001',
]);DNSSEC Kayıtlarını Listeleme
Alan adının DNSSEC imza kayıtlarını döndürür.
curl 'https://panel.ornek.com/api/v1/admin/services/520/domain/dnssec' \
-H "Authorization: Bearer $API_KEY"const res = await fetch('https://panel.ornek.com/api/v1/admin/services/520/domain/dnssec', {
headers: { Authorization: `Bearer ${apiKey}` },
});
const body = await res.json();$ch = curl_init('https://panel.ornek.com/api/v1/admin/services/520/domain/dnssec');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . $apiKey],
]);
$body = json_decode(curl_exec($ch), true);
curl_close($ch);$response = Api::Services()->GetDomainDnssecRecords(['id' => 520]);DNSSEC Kaydı Ekleme
Alan adına DNSSEC imza kaydı ekler.
201 ile döner.added alanına güvenmeyin.curl -X POST 'https://panel.ornek.com/api/v1/admin/services/520/domain/dnssec' \
-H "Authorization: Bearer $API_KEY" \
-H 'Content-Type: application/json' \
-d '{"digest":"49FD46E6C4B45C55D4AC","key_tag":12345,"digest_type":2,"algorithm":13}'const res = await fetch('https://panel.ornek.com/api/v1/admin/services/520/domain/dnssec', {
method: 'POST',
headers: {
Authorization: `Bearer ${apiKey}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
digest: '49FD46E6C4B45C55D4AC',
key_tag: 12345,
digest_type: 2,
algorithm: 13,
}),
});
const body = await res.json();$ch = curl_init('https://panel.ornek.com/api/v1/admin/services/520/domain/dnssec');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . $apiKey,
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode([
'digest' => '49FD46E6C4B45C55D4AC',
'key_tag' => 12345,
'digest_type' => 2,
'algorithm' => 13,
]),
]);
$body = json_decode(curl_exec($ch), true);
curl_close($ch);// Izinli ozet tipi ve algoritma MODULUN AYARINDAN gelir; standarttaki her deger kabul edilmez.
Api::Services()->AddDomainDnssecRecord([
'id' => 520,
'digest' => $digest,
'key_tag' => 12345,
'digest_type' => 2,
'algorithm' => 13,
]);DNSSEC Kaydını Silme
Bir DNSSEC imza kaydını kaldırır.
curl -X DELETE 'https://panel.ornek.com/api/v1/admin/services/520/domain/dnssec' \
-H "Authorization: Bearer $API_KEY" \
-H 'Content-Type: application/json' \
-d '{"digest":"49FD46E6C4B45C55D4AC","key_tag":12345}'const res = await fetch('https://panel.ornek.com/api/v1/admin/services/520/domain/dnssec', {
method: 'DELETE',
headers: {
Authorization: `Bearer ${apiKey}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({ digest, key_tag: 12345 }),
});
const body = await res.json();$ch = curl_init('https://panel.ornek.com/api/v1/admin/services/520/domain/dnssec');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . $apiKey,
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode([
'digest' => $digest,
'key_tag' => 12345,
]),
]);
$body = json_decode(curl_exec($ch), true);
curl_close($ch);// Son DS kaydini silmek alan adinin imza dogrulamasini kapatir; once yenisini ekleyin.
Api::Services()->AddDomainDnssecRecord(['id' => 520] + $newRecord);
Api::Services()->DeleteDomainDnssecRecord(['id' => 520] + $oldRecord);Tuzaklar
Güncelleme ve silme uçlarındaki identity, listeleme ucunun döndürdüğü değerdir; siz üretemezsiniz ve biçimi modülden modüle değişir. Ekleme yanıtı eklenen kaydı taşımayabilir, o yüzden ekledikten sonra kimliği öğrenmek için listeyi yeniden okumanız gerekir.
Silme ucunda yalnız kayıt tipi zorunludur. Ad, değer ve kimlik vermeden gönderilen bir istek aynı tipteki başka kayıtları da eleyebilir, çünkü eşleşmeyi modül yapar. Silmeden önce hangi kaydı hedeflediğinizi kimlikle sabitleyin.
Güncelleme ucu yalnız modül bunu sunuyorsa çalışır; sunmuyorsa not_supported döner. Böyle bir modülde tek yol kaydı silip yenisini eklemektir, bu da iki işlem arasında kısa bir kesinti demektir.
Özet tipi ve algoritma standarttaki her değeri kabul etmez: izinli küme modülün kendi ayarlarında tanımlıdır. Standarda uygun ama listede olmayan bir değer invalid_algorithm ile döner.
Bu uçlarda taslak ya da onay adımı yoktur; yaptığınız değişiklik tescil kuruluşuna gider ve yayılmaya başlar. Kullanımdaki bir alt ad sunucusunu silmek alan adını erişilemez bırakabilir, son DNSSEC kaydını silmek imza doğrulamasını kapatır. Yanlış giden bir değişikliği geri almak, önbelleklerin süresi dolana kadar sürer.
İlgili Makaleler
Geri bildiriminiz için teşekkürler!
Yukarıda bulamadığınız her şey için destek ekibimiz her zaman yanınızda.