• We value your experience with Plesk during 2024
    Plesk strives to perform even better in 2025. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2024.
    Please take this short survey:

    https://pt-research.typeform.com/to/AmZvSXkx
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

change NS for multiple domains

Darko Bazulj

Basic Pleskian
what is good way to modify NS records for multiple domains except doing that over panel manually?

Should I modify dns_recs table and then run
DNSMng.exe UPDATE domain.tld

Anyone have some example or have suggestion?
 
I modified all NS records

Example if someone find it usefull.

run on command prompt

"%plesk_dir%\MySQL\bin\mysql.exe" -uadmin -p*** -P 8306 psa -sNe "select id from dns_recs where type='ns' and val='ns2.wrong.com.';" > "C:\domains_list_wrong-id2.txt"

create script set-ns.bat and put next in and run

@echo off

for /f "tokens=*" %%a in (C:\domains_list_wrong-id2.txt) do (
"%plesk_dir%\MySQL\bin\mysql.exe" -uadmin -p*** -P 8306 psa -sNe "update dns_recs set val='ns2.ok.com.', displayVal='ns2.ok.com.' where id='%%a';"

)

run on command prompt

"%plesk_dir%\admin\bin\DNSMng.exe" UPDATE *
 
Back
Top