News for hackers. Stuff that matters.
Re:Www. is deprecated - should it be? by slyall on Sunday April 17, 2011 @07:22AM (#2455954)
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 is just a 301 to the www version.

Re:Www. is deprecated - should it be? by mechanical_fish on Sunday April 17, 2011 @07:51AM (#2455983)
So, 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.

Re:Www. is deprecated - should it be? by wewyor on Sunday April 17, 2011 @09:22AM (#2456088)
I 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.
Re:Www. is deprecated - should it be? by mechanical_fish on Sunday April 17, 2011 @08:43PM (#2457501)
Yeah, it's coming back to me now. Thanks!
Re:Www. is deprecated - should it be? by mveldthuis on Sunday April 17, 2011 @09:07AM (#2456068)
I 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.
Re:Www. is deprecated - should it be? by jeza on Sunday April 17, 2011 @11:23AM (#2456285)
Obviously 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.
Re:Www. is deprecated - should it be? by tvon on Sunday April 17, 2011 @12:42PM (#2456411)
Seems 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.
Re:Www. is deprecated - should it be? by Dylan16807 on Sunday April 17, 2011 @12:46PM (#2456421)
You don't even need a web server to throw a 301 at everything that comes by saying "GET / HTTP/1.1".
Re:Www. is deprecated - should it be? by jerf on Sunday April 17, 2011 @11:18AM (#2456272)
Do SRV records work?

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.

Re:Www. is deprecated - should it be? by bgentry on Sunday April 17, 2011 @02:13PM (#2456597)
This 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.
Re:Www. is deprecated - should it be? by krallja on Sunday April 17, 2011 @01:42PM (#2456524)
Completely 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.