Migration of a DNS setup from Hover to Cloudflare

I used Hover for all things DNS-related (domain registration and handling of all DNS entries) up until now. But when I wanted to setup DKIM I stumbled on a limitation - Hover only lets you add TXT records to your DNS up to 255 characters. For 2048-bit DKIM this is not enough, and splitting records (although the spec allows it) doesn't work either. So, either live without DKIM or find another solution. Well, hello then, Cloudflare!

Cloudflare is well known for its CDN, but also has a strong (and free) DNS offer. Also it allows very long TXT entries, ideal for DKIM. So, here's how to migrate.

ai-dns-edit.png|600

Export DNS settings from Hover

Hover doesn't offer a proper API to export your current DNS settings. Luckily enough I'm not the first person who wants to migrate away from Hover. Benjamin Chodroff explained in his blog article how to migrate to Google Cloud Platform DNS and linked the following JS code for the browser's Developer Console, created by Łukasz Korecki and published on GitHub Gist.


// Hover.com "Zone file import/export" has been *Planned* since 2011
// https://help.hover.com/entries/471066-Zone-file-import-export
// Here's a brittle approximation of export.
//
// 1. login to your account: https://www.hover.com/domains
// 2. run the following in your browser's JavaScript console, changing the first
//    line of the script to your domain
// 3. copy the text logged to the console.
// 4. manually correct FQDNs, these have to end with a period "."
//
// If things go wrong a noisy error should appear in the console; 
// JavaScript debugger might stop on the offending code.

var domain = 'example.com' // <<-- replace with your domain here
$.ajax({ type:"GET", url:"/api/dns", success:function(response){
  if (response.succeeded) {
    var entries = response.domains.filter(function(d) { return d.domain_name == domain })[0].entries
    var records = entries.map(function(e) { return [e.name, 'IN', e.type, e.content].join(' ') })
    var result = "$TTL 900\n" + records.join("\n")
    console.log(result)
  }
}})

So, navigate to the DNS entries page of your domain in Hover's web interface, open the browsers Dev Console (Ctrl+Shift+I), switch to the Console tab and paste the code. Grab the output from the console and save it somewhere. Have a close look at the CNAME entries, these needed some extra attention in my setup.

Import domain in Cloudflare

Start migration

Test that everything works

Create DNSSEC configuration