I know how www.example.com can be different from example.com. But is there really a need? Most of the time we end up setting both, www.example.com and example.com to the same IP. Is it still used only to make it more readable!?
I guess it's because people are so used to typing it in. You could do what twitter does and redirect www.example.com -> example.com, eventually it trains people not to put it in.
The only technical reason I can think of is that you cannot have CNAMEs for root domains, thus if you're using a CDN to host your website then you usually have to have it going from www or another subdomain.
CNAMEproblem is the killer one that everyone forgets. +many, if I could. May 7, 2014 at 4:43
CNAMEis not really even intended for the purpose it is mostly used nowadays. It's really
SRVthat should solve this and more, which it does for many "new" protocols but it doesn't really seem like it's going to happen for http as it requires support in the client. All those chickens and eggs... May 7, 2014 at 5:18
@HåkanLindqvist There are patches for most major clients to add SRV support. The only valid argument against it, and the one it's stuck on, is that it requires an extra DNS lookup for any domain that doesn't have an SRV record (most) and DNS lookups tend to be a meaningful amount of the time in loading a page (at least on reasonably fast websites).– Chris SMay 12, 2014 at 13:45
@ChrisS Absolutely, implementing the lookup is the easy part. Getting a transition like this to happen for something that is already as widely used as http is the difficult part, hence my chicken/egg comment. May 12, 2014 at 18:41
@HåkanLindqvist That's really not what I meant. SNI is facing a chicken-and-egg problem right now, but it's slowly moving toward it's inevitable adoption. SRV records for HTTP is not, nobody is implementing this, there are no plans to do so in the near future.– Chris SMay 12, 2014 at 20:24
- www.example.com is obviously a webserver
- mail.example.com is obviously an SMTP server
- dns.example.com is obviously a DNS server
Sure, www.example.com can be shortened to example.com but speaking only for myself, I like things to be explicitly defined. Less confusion and easier to troubleshoot.