Get Rid Of The ‘WWW’ Prefix – It’s Long Overdue

Oh Dear! monitors your entire site, not just the homepage. We crawl and search for broken pages and mixed content, send alerts when your site is down and notify you on expiring SSL certificates.

Start your free 10 day trial! »

Image of Mattias Geniar

Mattias Geniar, November 29, 2008

Follow me on Twitter as @mattiasgeniar

To understand why the “WWW” prefix or subdomain is outdated, we should first look at the original definition of WWW.

World Wide Web

n. Abbr. WWW 

1) The complete set of documents residing on all Internet servers that use the HTTP protocol, accessible to users via a simple point-and-click system. 

2) n : a collection of internet sites that offer text and graphics and sound and animation resources through the hypertext transfer protocol.

The important part here is the HTTP Protocol. Whenever a link is made, such as http://, the software will know that a connection to a webserver is made, on port 80. That’s what the http-protocol stands for.

The definition above implies that the “World Wide Web” uses the http protocol to send its data. Why then, do we still need to add the “WWW” subdomain? It’s a waste of time to type it. Wouldn’t it be easier to just type in the domain name, without the “WWW”?

While most webservers will accept traffic on the domain-name, without the WWW prefix, they usually redirect to the WWW-part of the website. Typing http:// will often land you on http://www.. This should be the other way around.

Using the following .htaccess rule, you can safely redirect all traffic from http://www. to the http:// version of your website.

Options +FollowSymlinks
RewriteEngine on
# Remove the WWW subdomain, and redirect to the domain itself
RewriteCond %{http_host} ^www\.domain\.com [NC]
RewriteRule ^(.*)$ http://domain.com/$1 [R=301,NC]

For more information on what Redirect-Code to use ([R=301]) I kindly refer you to the following page: Using Proper Header Redirects In PHP. There you’ll find a good explanation on the difference in 301 and 302 redirects, and their effect on search engines.

Will you help me share this post?

It would mean a lot to me if you could help share this post on social media. 🤗