Like many other domains we were recently been affected by the DDoS attack on Namecheap’s nameservers. We thought this would be a good time to move to another NS provider and then use Namecheap as a backup. Unfortunately Namecheap doesn’t let you export the hostname into a BIND zone file, but it does come with an REST API.

We created a open source python script to help you export your domain into a zone format for use with any other DNS provider.   You will have to first install easyzone which is based on dnspython. To install easyzone with setuptools do:

$ easy_install easyzone

This will install dnspython since it’s a dependency. After it’s installed you’ll want to grab our open source project. You can find the open source project on github: https://github.com/socialize/export-namecheap or directly clone it:

$ git clone git@github.com:socialize/export-namecheap.git

Once you’ve cloned the repo, copy private_settings.py.txt to private_settings.py and set the properties. You’ll first need to enable API access for your Namecheap domain.

Once you’ve set the properties execute the following command from the root of the export-namecheap project:

python export.py mydomain.zone

That should export your hosts into a zone file called mydomain.zone for you to use with another service.

We did end up using Amazon’s Route53 DNS service. To import the zone file we used a super simple to use open source tool from Barnaby Gray called cli53. We’ll probably end up using this tool for many other operational activities as well. It’s this simple:

cli53 import getsocialize.com --file mydomain.zone

This should’ve imported the zone file your route53 for you to review before making the big switch.

Let me know if you have any questions/comments below or contact me on twitter: @imosquera

Leave a Reply