There was a dark chapter in the early history of the Internet when, any time you wanted to go to a website, you had to painstakingly type “www.” in front of its domain name. This served a purpose of sorts: It told the server, in no uncertain terms, that you wanted to surf the World Wide Web. Never mind that the http:// prefix already said as much; Internet configuration was a dark and untested art, and it just seemed safest to use subdomains like www and ftp to be clear about which of your servers people were connecting to.
But then, as the millenium came to a close, and non-protocol related subdomains like webmail and blog began to proliferate, the www prefix began to fade away. To be sure, it remained on many sites as a vestigial reminder of the days of dial-up and Netscape Navigator, but most of the web’s denizens had learned that it could be safely forgotten. As hip newcomers like Twitter and foursquare dropped the prefix altogether, the augurs seemed clear: www was going gently into that good night.
Or was it?
Yesterday, someone posted to Hacker News that the domain nasa.gov is broken. You have to put www in front of it, or it won’t work. (Note that many browsers, like Firefox, automatically put www. in front of the domain you enter if it can’t reach it without it. But the most popular browser, Internet Explorer, doesn’t.) I replied that it had to be a temporary glitch—some idiot added a new subdomain to their DNS records and accidentally deleted the root!—but no, someone else pointed out, army.mil and navy.mil suffer from the same issue. It’s like they don’t want recruits who don’t habitually triple-tap ‘w’ before every web address!
Look: www has got to go. It’s a waste of bytes and time, our nation’s two most valuable resources. If you own a domain, here’s how to fix the problem:
- Find your nameserver settings, specifically your A records. Make sure that your root domain is pointing to the same IP address as your
wwwsubdomain. - Redirect
www.yourdomain.com/whatevertoyourdomain.com/whatever. If you’re using Apache, you just need to add the following to either your configuration or a.htaccessfile in the domain’s document root:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www\.yourdomain\.com.* [NC]
RewriteRule ^(.*)$ http://yourdomain.com$1 [R=301,L]
That’s it! Now if anyone tries to use www, even in a link to a specific page, they’ll still get to the right place. It’s so easy, even a rocket scientist could do it.
P.S. If you absolutely must keep www, at the very least allow those who omit it get where they’re trying to go. To do this, just modify the instructions above by using these lines in your Apache config instead:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^yourdomain\.com.* [NC]
RewriteRule ^(.*)$ http://www.yourdomain.com$1 [R=301,L]
This is what Facebook does, for instance. But just as they dropped their superfluous “The” (remember?), rest assured that there will come a time when Facebook.com will truly stand alone.

I still type thefacebook.com. On principle.