News for hackers. Stuff that matters.
Re:GitHub Pages with a custom root domain is slow by pilif on Tuesday May 13, 2014 @10:56AM (#7738424)
>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)

Re:GitHub Pages with a custom root domain is slow by joshstrange on Tuesday May 13, 2014 @11:03AM (#7738459)
Came 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-rec...

Re:GitHub Pages with a custom root domain is slow by dieulot on Tuesday May 13, 2014 @11:04AM (#7738470)
Damn, didn’t know that. Thanks, I’ll update.

Edit: Done, seeing changes will need an F5.

Re:GitHub Pages with a custom root domain is slow by pilif on Tuesday May 13, 2014 @11:09AM (#7738491)
Note 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-...), 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
Re:GitHub Pages with a custom root domain is slow by pudquick on Tuesday May 13, 2014 @01:27PM (#7739395)
You could also suggest using a free service like:

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.

Re:GitHub Pages with a custom root domain is slow by colevscode on Tuesday May 13, 2014 @02:07PM (#7739636)
Instead 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) 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/. (not an endorsement of godaddy)

(edited for clarity)