Remove the WWW and watch your Page Rank sky rocket

Getting the Page Rank You Deserve

No matter how many times I see this school of problems on websites I can never get my head around it. It is absolute laziness on the part of your web development team and nothing more. Let me simplify the problem here. Incorrectly managing your website address and in particular the www part will result in diluted page importance and significant search engine ranking penalties.

Got it.

Let me lay out a simple example of the problem for you. Google has 10 points to award your homepage. These points will determine how high up the search results you appear – the higher your score the better. With these 10 points in hand Google scours the web and looks for your homepage address so it can hand over the points.

It finds lots of links to your website and after removing the duplicates it comes up with:

  1. http://www.yourdomain.com
  2. http://yourdomain.com
  3. http://yourdomain.com/index.html

That all looks fine and dandy. Google being the smart camper it is decides that http://yourdomain.com/index.html and http://yourdomain.com/ are both the same page so it removes http://yourdomain.com/index.html from the list leaving just two.

  1. http://www.yourdomain.com
  2. http://yourdomain.com

All things being equal Google then splits the points between the two pages leaving each with 5.

No bad, half way there. Unfortunately your competitors didn’t hire lazy and dodgy to do their website and had http://www.yourcompetitor.com correctly redirected to http://yourcompetitor.com now Google, fully understanding how there website is structured gave there website the full 10 points. As a result their website gets more traffic in a day than you get all month.

Well, you get what you pay for. In case your wondering what it takes to ensure that all the Google page rank is properly credited to your website it’s about three lines added to one file. Not much more than 10 minutes work.

Linux Webserver (.htaccess)

Add the following three lines to a file called .htaccess in the root directory of your website. Create the file if necessary.

RewriteEngine On
RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]

C# ASPX Pages

Place the following code at the very top of your pages and it will achieve the same as the linux code above

if (Request.ServerVariables["HTTP_HOST"].Contains("www"))
{
    string optimalLocation = Request.Url.ToString().Replace("www.", "");
    Response.Status = "301 Moved Permanently";
    Response.AddHeader ("Location", optimalLocation);
    Response.End();
}

Caveats

XCart has login issues if you use the code above to remove the www and still have the www in the store configuration settings. If after you add the code above and you keep getting errors logging into your Xcart store rdon’t panic. Remove the code, log into Xcart and change the store Url to remove the www. Add the code back and all is well.

VN:F [1.9.17_1161]
Rating: 0.0/5 (0 votes cast)
Share the Love
Get Free Updates

No related posts.

Tags: , ,

2 Responses to “Remove the WWW and watch your Page Rank sky rocket”

  1. Leah says:

    This is wonderful advice and I always wondered if the ‘www’ ever made a difference in ranking. Can this same concept be applied to a WP blog or my Big Commerce Site?

    VA:F [1.9.17_1161]
    Rating: 0 (from 0 votes)
    • andrew says:

      Absolutely yes to your WordPress blog. Add the code to the top of the .htaccess file and away you go. Big Commerce doesn’t give you access to the htaccess file so you are out of luck – unfortunately the built in redirects manager doesn’t understand the problem so it is of no use either.

      VN:F [1.9.17_1161]
      Rating: 0 (from 0 votes)

Leave a Reply