Skip to content
Home Β» Blog Β» Script: Change Nameservers at

Script: Change Nameservers at

I still owe you the Nameservers script from the Add Domains to cart post. My bad πŸ˜‚

Note: offers an API now to change your Nameservers. You might want to check it out too. I just checked my script (30th August 2023) and it’s still working like before. But again, the API would be the ‘legit’ way to do it.

With this script you again have to get your cookie from and replace YOUR_SAV_COOKIE in the script with the cookie, as explained in the Add Domains to cart post.

You will also have to download (comes per Email) your domains list from and save it in the same folder as export.csv.

Note: If you have a larger portfolio with them (10k+ domains), I would suggest you download only the ones you want to change, like a page of 500 for example. Exports of larger portfolios often take ages with or never reach you.

The domains you want to change must be saved in a .txt file in the same folder (i.e. domains.txt) in the following format:


Here’s the script. Save it as and make it executable (as described in the Add to cart post)


if [ $# -eq 0 ]
    echo "usage: domains.txt"

for LINE in `cat $1`
    DOMAIN=`echo $LINE | cut -d";" -f"1"`
    NS_1=`echo $LINE | cut -d";" -f"2"`
    NS_2=`echo $LINE | cut -d";" -f"3"`
    DOMAIN_ID=`cat export.csv | grep "$DOMAIN" | sed "s/\",.*//" | sed "s/\"//"`
    if [ -z "$DOMAIN_ID" ]
	echo "$DOMAIN ID not found, skipping"

    echo -n "$DOMAIN $DOMAIN_ID: "

    while :
        RESPONSE=`curl \
        -s \
        --cookie "YOUR_SAV_COOKIE" \
        "" 2>/dev/null`

        if echo $RESPONSE | grep -q "success"
	    echo -n " OK"
	    echo -n " retry"
	    sleep 1s

    echo ""
done often fails when changing the Nameservers. That’s why I added a retry function. It retries to set the Nameservers until they are finally set. πŸ˜‚

You then call the script with:

./ domains.txt

or whatever you named your domains file.

Hope that helps.

If you have any questions, leave them in the comments or over there at Twitter/X.


Leave a Reply

Your email address will not be published. Required fields are marked *