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!?
Asked
Active
Viewed 3,865 times
2 Answers
15
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.
Andrew Schulman
- 8,561
- 21
- 31
- 47
Noodles
- 1,356
- 3
- 18
- 29
-
6The `CNAME` problem is the killer one that everyone forgets. +many, if I could. – MadHatter May 07 '14 at 04:43
-
2`CNAME` is not really even intended for the purpose it is mostly used nowadays. It's really `SRV` that 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... – Håkan Lindqvist May 07 '14 at 05: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 S May 12 '14 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. – Håkan Lindqvist May 12 '14 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 S May 12 '14 at 20:24
-
@ChrisS I don't think I understand what point you are trying to make because both of your comments seem (to me, at least) to overall agree with what I just said but the phrasing makes it sound like that is not your intention. As for SNI it really seems entirely off-topic but in that case there is not really any substantial tradeoff so I would presume that made it much easier to motivate adoption even though it was not immediately useful. – Håkan Lindqvist May 12 '14 at 21:01
6
- 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.
user1174838
- 616
- 5
- 18