Your Guide to 301 Redirects for SEO

Ever since Web addresses started appearing in print, it’s been tempting to lop the “www” off to make the URL easier to remember and to use.

Does it matter if you do that? Is a www address better for SEO? If a viewer uses www, will the page show up differently than if they don’t?

Though the “does www matter” question can spark holy wars, in general nothing bad will happen whether visitors type in www or leave it off. But there are things you should handle with care, lest your SEO campaign suffer.

Should I Use WWW or Not?

When you register a domain name, you register, not That’s because the www part of the URL is actually considered a subdomain, much like,, etc. The www largely is a carryover from the days of the Internet when you had to specify that you were using a World Wide Web site and not something like gopher or ftp.

While most of the time typing and will take users to the same place, they are technically different URLs that could be set up to display different content.

Now for the bad news. When it comes to domains, Google practices what’s called canonicalization, the process of selecting a “preferred domain” URL that best represents the site. If the site owner doesn’t choose one, Google will decide which URL to index.

If Google picks but all your links point to, then the fruits of your efforts are being diluted, causing a disadvantage to your SEO campaign.

The Preferred Domain

Thankfully, you can choose a preferred domain rather than leaving it to chance. Log in to Google Webmaster Tools and follow these steps:

  1. Click on your site on the Webmaster Tools home page.
  2. Click on the gear icon and then click Site Settings.
  3. Find the Preferred domain section and select the option you want.

If you built your site without selecting a preferred domain, any links to your non-preferred domain won’t benefit your preferred one from an SEO perspective, unless your non-preferred one redirects to the corresponding preferred version using a 301 redirect.

What Is a 301 Redirect?

A 301 redirect is the HTTP status code for when a page has been moved permanently to a new location or URL.

In our case, if we set as our preferred domain, we can set a 301 redirect for, Similarly, we also can do this for or

With a 301 redirect, the value of inbound links as well as historic/trust records for one URL will move to the other, though there’s debate as to just how much of this benefits are passed on to the new URL. While estimates vary, I’ll address this a bit later in this article.

Setting Up the 301 Redirect

To set up a 301 redirect on an Apache server, you have to open your .htaccess in a text editor, then enter one of these snippets of code into your file and save it.

For redirecting a non-www URL to a www URL:

Options +FollowSymLinks

RewriteEngine On

RewriteCond %{HTTP_HOST} ^$ [NC]

RewriteRule ^(.*)$$1


For redirecting a www URL to a non-www URL:

Options +FollowSymLinks

RewriteEngine on RewriteCond %{HTTP_HOST} .

RewriteCond %{HTTP_HOST} !^

RewriteRule (.*)$1


If your website is based on WordPress, dozens of free plugins exist to help you easily set up and manage 301 redirects. A simple one I prefer to use is called “Simple 301 Redirects.”

You can test your redirect by simply visiting your old URL; if you’re immediately taken to the new URL, it’s working.

The 301 Redirect and Inbound Links

You might have heard that using a 301 redirect can lead to losing 15 percent of your “link juice.” Many sites quote Matt Cutts, Google’s head of Web spam, as having made that statement. To the contrary, Cutts said in this video that links passed from one domain to another using a 301 result in no loss of link juice. However, skeptics remain, and many SEO professionals are hesitant to take Cutts’ word as truth.

What About rel=”canonical”?

Some SEO professionals recommend using rel=”canonical” instead of 301-redirects because they think that 301 redirects could hurt performance due to a browser having to make an extra trip. Again, Cutts has debunked this myth, stating in this video that while the rel=”canonical” tag is effective, browsers and search engines both know how to deal with a 301 redirect.


Using a 301 redirect is an effective, simple fix if you need to permanently move a page from one URL to another, or clean up www vs. non-www issues. It’s easy to set up and is well-understood by Web browsers.

Related reading

A screenshot of visual search on Pinterest. On the left is a picture of a copper angle-poise lamp, with the words 'Visually similar results' above it. Down the right-hand side are a number of pins showing similar lamps.
google amp project
Simple Share Buttons