5 ms·
The main problem with the plain "no www" record is that there is much less you can do with it in DNS. Most especially you can't make it a CNAME nor can you dele
by slyall 16y ago
The main problem with the plain "no www" record is that there is much less you can do with it in DNS. Most especially you can't make it a CNAME nor can you delegate the DNS to somebody else without delegating the whole domain.
With a www.example.com I can just make www a CNAME to a cloud or CDN vendor. With plain example.com I have to delegate DNS for my whole domain to that vendor (assuming they do that service) or use a A-record and go with one of the 3 anycast CDN's in the world.
Same if I want to use a GSLB service. I can just make it a CNAME or put in a NS record for my www.example.com . For example.com I'd have to run GSLB myself or put my whole domain under control of the external vendor.
So all work's domains have the smart stuff on www.example.com and the http://example.com http://example.com is just a 301 to the www version.
- mechanical_fish 16y agoSo, I believe it turns out that you can cheat and just define a non-www name as a CNAME to another non-www name. And that mostly works, kind of, maybe, even though it's a violation of the standards. Except that it'll break under some conditions, but maybe you won't care too much. Or something. Bleargh. Frankly I've forgotten the headsplitting details of trying to finesse the DNS RFCs. What I do remember is that my company, which does cloud hosting on behalf of many customers, looked into this and determined that for now we should do as you suggest and actually follow the spec: Either point your A record directly at your webserver (or its reverse proxy) or use the www. subdomain as a CNAME. I was left with much sympathy for the folks who designed the standard www. subdomain in the first place: They did what they had to do to work sensibly within the DNS system without having to redesign entire corporate domains around the needs of the web server.
- wewyor 16y agoI think one of the main problems for no www. domains is that even though some dns systems let you assign the root record to a CNAME is that it breaks MX records if you do so.
- mechanical_fish 16y agoYeah, it's coming back to me now. Thanks!
- mveldthuis 16y agoI don't mind the www., the thing I absolutely hate is sites that require it, but don't put up a 301 on the www-less url.
- jeza 16y agoObviously not possible if domain and www.domain point to different hosts where the host for domain does not run a web server. I'm sure there are numerous other reasons.
- tvon 16y agoSeems it would be worth it to run a lightweight server on :80 solely to redirect to the www host. Sounds better than "foo.com" just not working.
- Dylan16807 16y agoYou don't even need a web server to throw a 301 at everything that comes by saying "GET / HTTP/1.1".
- jerf 16y agoDo SRV records work? http://www.anta.net/nic/draft-andrews-http-srv-01.shtml http://www.anta.net/nic/draft-andrews-http-srv-01.shtml Honest question, because I've never tried it. I would believe effectively no web browsers honor it correctly, and certainly there's a boatload of non-web-browser code that won't honor it correctly.
- krallja 16y agoCompletely agree; the minute I can host my www-less website on S3, I will. Until then, my www.$domain is a CNAME, and $domain is lucky if it gets a machine serving 301s.
- bgentry 16y agoThis is correct, and it is the main reason why you will be hard-pressed to find a massive company whose root domain doesn't redirect to www.