How to move domains from iwantmyname to porkbun

I had been hosting this domain on for over 9 years. It's a great registrar, but I've found a cheaper one with more features at I had a bunch of records for CNAMEs and also verification subdomains for various external services. I've written a bit of shell script to use the porkbun API (documented at to create the new records.

First create an API key in porkbun's control panel. Then copy the api key and the secret to the command below.


while IFS= read -r line; do
 while read -r record type addr; do
   printf 'line: record: %s type: %s addr: %s \n' "${record}" "${type}" "${addr}"
   curl  -H "Content-Type: application/json" --request POST --data '
      "secretapikey": "xxxxxxxxxxxxxxxxxxxxx",
      "apikey": "xxxxxxxxxxxxxxxxxx",
      "name": "'"${record}"'",
      "type": "'"${type}"'",
      "content": "'"${addr}"'",
      "ttl": "600"
      '  \${DOMAIN}
 done <<< "${line}"
done < records.txt

My previous registrar iwantmyname doesn't have a good API (only a basic DDNS functionality), so I've copied the existing records from the web UI and massaged them with some vim macros into something like this in records.txt:

subdomain A
subdomain CNAME othersubdomain 

Then I ran the script above on the existing records, et voilà, the records are moved from old registrar to the new one.


Bu blogdaki popüler yayınlar

Ubuntu'yu CD iso dosyası ile güncellemek

Bir kaç izin meselesi

NFS ve Xen sorunu, çözüm UDP