In this article I will show you how you can boost your PageRank by implementing two simple fixes, so you website will use a preferred domain. Each fix should only take you one minute to implement… and it is the very first thing I do after setting up a new domain on my web server.

Most websites can be reached via two web addresses. One web address has the www in it, like, whereas the other web address has the www missing like

In order to have better SEO for your website, you need to pick one domain format and be consistent with it. If you do this, then Google will not give separate PageRank for two URLs that point to the same page.

At this point, you might say… that’s crazy! Aren’t they both the same site!?

But think of it like this. You are running your own hosted blogging platform called “”. Each blog user will be given a subdomain such as “” and “” etc. Now if Google treated all the subdomains as part of the main domain, the PageRank results will be inaccurate. It’s a similar story for www, which is just another subdomain.

Fix #1: Set a Preferred Domain in Google Webmaster Tools

Login to your Google WebMaster Tools account and set the preferred domain. Once you have specified your preferred domain, it may help determine PageRank for your site more accurately since the value of each page will not be split across two domains.

From Google Help:

The preferred domain (www or non-www) is the one that you would liked used to index your site’s pages (sometimes this is referred to as the canonical domain). Links may point to your site using both the www and non-www versions of the URL (for instance, and The preferred domain is the version that you want used for your site in the search results.

Fix #2: Add a 301 Redirect to the Preferred Domain

After you have set your preferred domain, you need to force all users to use the preferred domain by using a server-side 301 redirect. The 301 status code means that a page has permanently moved to a new location.

You can do this by editing the .htaccess file in the root directory of your domain on the web server. It is usually located at /public_html/

In my case, I want everyone visiting eBlogCamp to do so with the www in the URL. To force this, edit your .htaccess file and enter the following Apache directives:

# BEGIN 301 Redirect
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTP_HOST} ^eblogcamp\.com$ [NC]RewriteRule ^(.*)$$ 1 [R=301,L]</IfModule>
# END 301 Redirect

You need to replace “” with your domain name. The code above is an Apache directive that redirects all to


  • The redirect code in the .htaccess file only works on Linux web servers running Apache with the Apache Mod-Rewrite module enabled.
  • If you are using a WordPress caching plugin such as W3 Total Cache, make sure that you add these new Apache directives to the very top of your .htaccess file.

How it Works

By having one preferred domain format, you are ensuring link consistency.

For example, if ten sites are linking to your article with a www prefix and another ten sites are linking to the same article without the www prefix, then Google sees the article as actually two pages. Thus the article will not receive the same weighting as having all twenty sites linking to the preferred domain. The .htaccess code ensures that all requests goes to the domain format that you want.

What do you Think?

Did you already have a preferred domain and your .htaccess file configured? If not… did my fixes take you less than two minutes to implement?


Founder of, an author, blogger, designer, and SEO expert who designs and develops websites as a freelancer. Offcourse, you can follow me on Twitter @designstutorial.