DNS zone file
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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 | |
// 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 = 'tool-man.org' | |
$.ajax({ type:"GET", url:"/api/dns", success:function(response){ | |
if (response.succeeded) { | |
var entries = _(response.domains).find(function(d) { return d.domain_name === domain }).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) | |
} | |
}}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$TTL 900 | |
@ IN TXT v=spf1 include:_spf.google.com ~all | |
@ IN MX 1 ASPMX.L.GOOGLE.COM. | |
@ IN MX 5 ALT1.ASPMX.L.GOOGLE.COM. | |
@ IN MX 5 ALT2.ASPMX.L.GOOGLE.COM. | |
@ IN MX 10 ASPMX2.GOOGLEMAIL.COM. | |
@ IN MX 10 ASPMX3.GOOGLEMAIL.COM. | |
blog IN CNAME toolbear74.wordpress.com. | |
mail IN CNAME ghs.google.com. | |
sites IN CNAME ghs.google.com. | |
docs IN CNAME ghs.google.com. | |
calendar IN CNAME ghs.google.com. | |
smtp IN CNAME smtp.gmail.com. | |
tim IN CNAME toolbear.github.io. | |
boxen IN CNAME toolbear-boxen.herokuapp.com. | |
@ IN A 192.30.252.153 | |
@ IN A 192.30.252.154 | |
@ IN TXT keybase-site-verification=pcgVuIGYAkz2Nu5_YeDbzsvG-YiWgi3Ryz9RMlsWMsU |
This worked excellently, thanks! Very clever. ;)
Thank you so much for writing this little script and sharing it, I really appreciate it.
Thank you sir!
Much appreciated!
Years later this is still much appreciated. Thank you!
2021 still works 🙏
works. +1 what's up with hover.com?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks!