301 Redirects – How to Use Them Correctly

Why does the redirect question even have to arise in the first place? There are 2 main reasons:

1. To make sure all users can access your webpage

Some users will type in example.com in the address bar. Others will type www.example.com. A few will also do http://example.com or http://www.example.com.

You want all of them to point to the correct version of our web address; it would be sad (stupid?) to lose traffic just because someone omitted the www or added an extra one.

2. To funnel all link juice to your real website

Just like different people will access your website using different URLs, different people will link to your website in the same fashion. With WWW or without it.


You don’t want to have your inbound link strength divided among two ‘different’ websites (or even worse, lose the link strength altogether because one version is not even available!).

Redirecting to the correct version of your website makes sure inbound links don’t go waste, regardless of the version of the URL people use to link to you.

Now that we’ve established the ‘why’, let’s get into which version of the URL to use.

“Should I make my website a WWW one or a non-WWW one?”

The web is filled with arguments (and web wars) for both sides. There are even entire websites dedicated to promoting the use of each version.

For WWW: http://www.yes-www.org

For non-WWW: http://no-www.org

I will distill down the main arguments for both and will list them in this article.

Arguments for Using WWW

The main benefit of using WWW is the ability to use CDNs like the free Cloudflare service. CDNs cache static content and make them available geographically nearer to Internet users. This greatly increases page load speed (and decreases page load time, which is a big plus for user experience and SEO).

You will not be able to use a CDN on example.com, but it’s a 30-second operation if your website is www.example.com.

The technical explanations are here if anyone is interested.

Other arguments include cookie restriction and a reminder that the World Wide Web is not THE Internet, but part of it.

Arguments for Ditching WWW

It’s shorter. That’s really about it. example.com looks better in advertising and sounds better when speaking. Saying www.example.com is so 90s. Non-WWW addresses are modern, like Twitter.com.

Which One Should You Choose?

Google uses WWW. Twitter doesn’t. They’re both authorities in their own fields. It boils down to personal choice. I personally prefer using WWW because of the CDN benefit I mentioned above. I can still write example.com in prints or tell people to visit my website on example.com, because I redirect that to the WWW version of my site.

What You Need to Do after Making your Choice

Redirect! Once you’ve picked your poison, redirect its counterpart to the correct version.

How do you do that? With a 301 redirect.

According to Moz,

“A 301 redirect is a permanent redirect which passes between 90-99% of link juice (ranking power) to the redirected page. 301 refers to the HTTP status code for this type of redirect. In most instances, the 301 redirect is the best method for implementing redirects on a website.”

Here is how to do that. Open your .htaccess file in a text editor, and add the following snippets at the top.

1. For Non-WWW to WWW

Options +FollowSymLinks

RewriteEngine On

RewriteCond %{HTTP_HOST} ^domain\.com$ [NC]

RewriteRule ^(.*)$ http://www.example.com/$1


2. For WWW to non-WWW

Options +FollowSymLinks

RewriteEngine on RewriteCond %{HTTP_HOST} .

RewriteCond %{HTTP_HOST} !^example\.com

RewriteRule (.*) http://example.com/$1


Save the changes you’ve made, and upload the file back to your root folder (where you took it from). Yes, replace the old one. Now open a new tab and check if it’s working; it should.

If you use WordPress, there are plenty of plugins that will do the redirection for you without you having to touch the .htaccess file, but I prefer doing it manually. Also, don’t forget to change the URLs in your WordPress settings (WordPress address and Site address). Add or remove the WWWs as needed.

For those wondering if you should be using rel=”canonical”, Matt Cutts said it’s not necessary if you are doing a 301 redirect, because everyone knows what this is by now, and search engines won’t penalize you for changing your website address. And that was in a 2012 video shown below!

If you enjoyed this post, please consider leaving a comment or subscribing to the RSS feed to have future articles delivered to your feed reader.


Leave a Reply