Many websites have addresses that use a www.-
prefix. Some people are encouraging this
practice, other are advising against
it.
I, for one, think this prefix makes sense and is really useful, so here is an explanation of my opinion. In a nutshell: the Wold Wide Web is one Internet service among many other such as domain name, mail, mailboxes or instant messenging; using a dedicated prefix allows to distribute all these services to specific servers in a convenient way.
On Internet, you can expose several services, the most common being domain names (DNS), websites (HTTP), incoming mail (SMTP), outgoing mail submission (submission), mailbox fetching (POP) or consultating (IMAP) and instant messenging (XMPP).
Constraints
Modern Internet services can have constraints such as load balancing, failover and most importantly the possibility to use specific servers for each service instead of having all of them on the same server.
Dedicated records
Some service were designed or revised to take these contraints into account; this include the domain name, incoming mail and instant messenging, by using dedicated DNS records:
example.com. NS roquefort.example.com. example.com. MX 10 morbier.example.com. _xmpp-server._tcp.example.com. SRV 10 100 5269 morbier.example.com.
In that example, the name service of example.com.
is
provided by the server Roquefort while the incoming
mail and instant messenging service are provided by Morbier
Dedicated prefixes
On the contrary, some services were not designed to take these constraint into account, and may be too fossilized to be revised for that; this includes the Web and mailbox service. A convenient way to work around the antiquated design of these services is to use a well known prefix:
www.example.com. CNAME ossau-iraty.example.com. smtp.example.com. CNAME morbier.example.com. pop.example.com. CNAME morbier.example.com. imap.example.com. CNAME morbier.example.com.
In that example, the Web service of example.com.
is
provided by the server Ossay-Iraty while the email
submission and mailbox services are provided by Morbier.
Readability and flexibility
Using dedicated records and prefixes increases the consistency and readability of a DNS zone, since it allows to refer to the servers by their canonical host name, and to define their IP addresses once and for all:
; Services example.com. NS roquefort.example.com. example.com. MX 10 morbier.example.com. pop.example.com. CNAME morbier.example.com. imap.example.com. CNAME morbier.example.com. www.example.com. CNAME ossau-iraty.example.com. ; Hosts roquefort.example.com. A 192.2.0.12 AAAA 2001:db8::12 morbier.example.com A 192.2.0.42 AAAA 2001:db8::42 ossau-iraty.example.com. A 192.2.0.51 AAAA 2001:db8::51
You can think of that practice as connecting dots between services and hosts:
name service •────────────────────→• Roquefort incoming mail •────────┬───────────→• Morbier mailboxes •────────╯ ╭─────────→• Ossau-Iraty website •──────────╯
With such a DNS zone, it is very easy to identify which server is hosting each service. Using host names rather than IP addresses multiple times reduces the information duplication, which in turn facilitates future chances and reduces the risk of error (it is easier to swith the website from Ossay-Iraty to Morbier than from 192.2.0.51/2001:db8::51 to 192.2.0.42/2001:db8::42).
9 comments
friday 13 april 2012 à 00:41 Iñigo said : #1
friday 13 april 2012 à 02:19 calestyo said : #2
friday 13 april 2012 à 02:59 www.www.www.com.com.com said : #3
friday 13 april 2012 à 08:45 Tanguy said : #4
sunday 15 april 2012 à 17:36 mirabilos said : #5
monday 16 april 2012 à 10:08 Tanguy said : #6
monday 16 april 2012 à 22:14 Quimby said : #7
tuesday 17 april 2012 à 01:54 rjc said : #8
monday 23 april 2012 à 09:13 Antoun Sehnaoui said : #9