4 ms·
>The short solution is, instead of using yourdomain.com, use www.yourdomain.com. Then, redirect the root domain to the www subdomain using a DNS CNAME record.
by pilif 12y ago
>The short solution is, instead of using yourdomain.com, use www.yourdomain.com. Then, redirect the root domain to the www subdomain using a DNS CNAME record.
The root can't be a CNAME because no other record with the same name aside of a CNAME can exist. Your domain root also has one SOA and two NS records (and probably one more more MX records if you want to receive mail)
See RFC 1912 (Section 2.4)
- joshstrange 12y agoCame here to say the same thing. It can play hell with your email if you do manage to put a CNAME on the root [0]. [0] http://joshstrange.com/why-its-a-bad-idea-to-put-a-cname-record-on-your-root-domain/ http://joshstrange.com/why-its-a-bad-idea-to-put-a-cname-rec...
- deleted 12y ago[deleted]
- dieulot 12y agoDamn, didn’t know that. Thanks, I’ll update. Edit: Done, seeing changes will need an F5.
- pilif 12y agoNote that some DNS providers hack around the issue (like CloudFlate by pretending your CNAME was in-fact an A record http://blog.cloudflare.com/introducing-cname-flattening-rfc-compliant-cnames-at-a-domains-root http://blog.cloudflare.com/introducing-cname-flattening-rfc-...), but if you're self-hosting DNS or your DNS provider doesn't do any special handling, then you can't have a root CNAME
- pudquick 12y agoYou could also suggest using a free service like: http://wwwizer.com/naked-domain-redirect http://wwwizer.com/naked-domain-redirect It'll 302 redirect naked domains to www.domain, which will resolve to whatever you've configured it for. This should let you chain A -> 302 redirect -> CNAME and bypass the GitHub DDoS protection.
- colevscode 12y agoInstead of "redirect the root domain to the www subdomain using a DNS CNAME record" it should say "... using domain forwarding". Most DNS hosts offer some mechanism for forwarding traffic from your apex domain to the www subdomain using a 301 (permanent) redirect. Then the www subdomain can be configured with a CNAME record. For example, at Brace (http://brace.io http://brace.io) we offer a guide for configuring this if your domain is on godaddy. See step 3 at http://blog.brace.io/2014/01/19/custom-domains-godaddy/ http://blog.brace.io/2014/01/19/custom-domains-godaddy/. (not an endorsement of godaddy) (edited for clarity)