MX records were used because SMTP traffic for user@domain had to route different traffic for this domain differently, and SRV had not yet been invented.
The modern convention that you can enter http://example.com/ in your browser without the www prefix and still get to the website you want is actually a bit strange. To explain in more detail how to configure a zone to achieve this prefix access:
$ORIGIN example.com @ IN A 192.168.1.1 IN MX mail.example.com www IN A 192.168.1.1 mail IN A 192.168.1.2
Thus, any traffic addressed to example.com is redirected to this IP address, regardless of the protocol used (unless it is sent by email, which will use the MX record).
In practice, it would be preferable if all applications used SRV , and then we could bypass all application prefixes and also use A records for their real purpose - in particular, mapping real host names to IP addresses.
If the SRV records were used in such a way that the zone file would look like this:
$ORIGIN example.com _http._tcp IN SRV 0 0 80 www.example.com _smtp._tcp IN SRV 0 0 25 mail.example.com www IN A 192.168.1.1 mail IN A 192.168.1.2
This assumption that the primary A record in the domain is actually used for the HTTP service is also part of the reason that the Verisign SiteFinder "" caused as many problems as it did (in short) introduced in 2003. Having intercepted all the DNS A records for unknown domains and returned one of its own addresses, Verisign violated all sorts of protocols that suggested that they could fail -over to other address database mechanisms if the DNS lookup failed.
Alnitak Dec 22 '08 at 0:57 2008-12-22 00:57
source share