Question
How to add/change a DNS NS record in Plesk?
Answer
-
Go to Domains > example.com > Hosting & DNS > DNS.
-
Click Add DNS Record to create a new record or click on an existing NS record to modify.
-
On the next page, specify:
-
Record type: NS
-
Domain name:
- Leave blank to propagate the record on a domain itself
- Specify a subdomain prefix to propagate the record on a particular subdomain
- Specify a wildcard (*) to propagate the record on all subdomains
-
Name server: ns1.example.com
-
-
Go to Tools & Settings > DNS Settings and
-
Click Add DNS Record to create a new record or click on an existing NS record to modify.
-
On the next page, specify:
-
Record type: NS
-
Domain name:
- Leave blank to propagate the record on a domain itself
- Specify a subdomain prefix to propagate the record on a particular subdomain
- Specify a wildcard (*) to propagate the record on all subdomains
-
Name server: ns1.example.com
-
-
Click OK.
-
Now all newly created domains will use this template for their DNS zones. To apply the changes to all existing domains, click the here button in the appeared prompt.
For new domains
-
Go to Tools & Settings > DNS Settings and click Add DNS Record.
-
On the next page, specify:
-
Record type: NS
-
Domain name:
- Leave blank to propagate the record on a domain itself
- Specify a subdomain prefix to propagate the record on a particular subdomain
- Specify a wildcard (*) to propagate the record on all subdomains
-
Name server: ns1.example.com
-
-
Click OK.
For existing domains
-
Connect to a Plesk server via RDP.
-
Create a backup of the Plesk database:
C:> plesk db dump psa > C:psa_dump.sql
-
Generate a list of all domain names on the server:
C:> plesk bin site --list > C:domains.txt
-
Add a new NS record for domains from the generated list:
Note: Replace newnameserver.tld with your new name server.
C:> for /f %i in (C:domains.txt); do @("%plesk_cli%dns.exe" -a %i -ns "" -nameserver "newnameserver.tld");
-
Optional: Remove old DNS NS records of all domains:
C:> for /f %i in (C:domains.txt); do @("%plesk_cli%dns.exe" -d %i -ns "" -nameserver "ns1.example.com");