Plesk

How to add/change a DNS NS record in Plesk

Question

How to add/change a DNS NS record in Plesk?

Answer

 

For one domain

 

  1. Log in to Plesk.

  2. Go to Domains > example.com > Hosting & DNS > DNS.

  3. Click Add DNS Record to create a new record or click on an existing NS record to modify.

  4. 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

 

For all domains in Plesk for Linux

 

  1. Log in to Plesk.

  2. Go to Tools & Settings > DNS Settings and

  3. Click Add DNS Record to create a new record or click on an existing NS record to modify.

  4. 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

  5. Click OK.

  6. 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 all domains in Plesk for Windows Server

 

For new domains

  1. Log in to Plesk.

  2. Go to Tools & Settings > DNS Settings and click Add DNS Record.

  3. 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

  4. Click OK.

 

For existing domains

  1. Connect to a Plesk server via RDP.

  2. Start a command prompt as an Administrator.

  3. Create a backup of the Plesk database:

    C:> plesk db dump psa > C:psa_dump.sql

  4. Generate a list of all domain names on the server:

    C:> plesk bin site --list > C:domains.txt

  5. 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");

  6. 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");