So I've got a domain registered with Dreamhost, which apparently does not do recursive lookups, and an app on Heroku. Heroku apps are always configured to use a CNAME record to proxy.heroku.com
.
So:
Authoritative DNS: ns1.dreamhost.com (for foo.com)
CNAME record: app.foo.com -> proxy.heroku.com
Resolves to: Set of A records for EC2 IPs
I've been told by some folks trying to connect to the app from behind a Windows Server 2003 DNS Server that it handles SERVFAIL differently and cannot resolve the DNS. I'm trying to understand if this is truly a configuration issue on my side or theirs, notably, per the title:
Must the authoritative DNS server for a domain be recursive to allow CNAME records pointing to other domains?
No you don't need to have recursion on for authoritative DNS servers. Depending on who you ask it's even considered good practice that (if possible) your authoritative server not be recursive as it's a line of defence against some DoS attacks. (Cisco's document is here for example)
A sample from my domain is below (Server is running Bind 9 and is non-recursive).
It sounds more like a DNS misconfiguration at the Windows 2003 DNS than anything else.
Authoritative servers should NOT be configured to offer recursive service. Not even to work around a potential Microsoft bug.
I can't quote chapter and verse at the moment (if I find it I'll update). However this is very much the accepted "best common practise" for operation of DNS servers.
If some resolver in your lookup chain is returning
SERVFAIL
then that simply indicates a misconfiguration somewhere or that you're asking the wrong question (or the right question with the wrong flags).In your case, the
dreamhost.com
servers returnSERVFAIL
if you ask for a recursive answer (which happens to be whatnslookup
does by default). They're perfectly entitled to do that, they're authoritative servers, not recursive.On my system, if I use
dig
instead and specifically disable recursion I get:Dreamhost uses powerdns (ugh), just as bad .. but Windows recursive resolvers do indeed suck.
The question is , why are the Windows dns boxes at your client sites getting SERVFAIL? They shouldnt be.
And, the above poster is correct - if you're authoritative to a domain, you can have it cname, A, fail, you name it, to any domain/ip (you don't have to know the glue to the other domain).
Perhaps that's it - that the DNS resolvers that asked for your A record (and got a cname) stuck thinking it would also know the glue for heroku.com .
You could analyse the listed nameservers for the original query to see what's happening , but in a 'worse case' scenario you could just serve out 'A' records .. it'd just be a P-I-T-A.
If you want to post a realworld fail-domain that's cool; you could also PM or AIM nerdNG :p (I love finding root-cause probs with dns. Go fig)
I've been looking for "similar" questions to my own here and there seems to be quite a few similar points (e.g. Windows2003 DNS servers and SERVFAIL response)
If anyone has any link to the "potential Microsoft bug" above, would they mind posting details.
Much appreciated.