Making Communications Buzz

Thursday, January 25, 2007

"www" in a website address: Why it matters to website success - continued

Here is a follow-up to my post about why "www" in front of your domain matters to the rank of your website in search engines like Google, Yahoo and MSN ("www" in a website address: Why it matters to website success).

If you want the code to use on your website host server to change all incoming requests for URLs without the "www" into URLs with the "www", simply put the following into your .htaccess file. The first 2 lines are a comment to remind you what the code is for.

# If an address without the "www." prefix is entered,
# this will redirect to the page with the "www." prefix.
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]

# That's it!

Here is a good resource on .htaccess files:
http://encyclopedia.thefreedictionary.com/htaccess


Also, remember to change other settings and code on your website that involve the domain and whether it has "www" in it or not.

For example, WordPress blog software users should be sure to make the following changes.

Before adding the above code to the .htaccess file, WordPress users must be sure to login to their blog admin panel and go to Options > General.

Under *WordPress address (URI)* enter the address with "www." in front if it is not already there.

Likewise for the *Blog address (URI)*.

If these addresses don't have "www." in them, the .htaccess rewrite will cause an error. Other blog software, such as Typepad, is likely to require a similar change.

("URL" stands for Universal Resource Locator and "URI" stands for Universal Resource Indicator". For most purposes, the two terms are interchangeable: both mean "web address".)

If you use Google Site Search, you will need to make sure that the domain used in the Site Search code has "www" in it.

After adding the rewrite code to my .htaccess file, Google Site Search I use on McBuzz.com at http://www.mcbuzz.com/search.shtml did not work. The results page was blank. To make it work again, I went into the HTML and changed
input type="hidden" name="domains" value="mcbuzz.com"
to
input type="hidden" name="domains" value="www.mcbuzz.com"

The fact that Google Site Search requires the "www" is further evidence, it seems to me, of the importance of standardizing your URL to include "www". (You could try to standardize it to not include "www", but that seems -- well, not as standard, and thus harder to implement.)

If you have questions or comments about using the .htaccess file, or about the importance of standardizing your domain as either "www.example.com" or "example.com", please post your comment below or contact me through the McBuzz Communications website.

Looking forward to hearing from you!

Labels: , , , , ,

Tuesday, January 16, 2007

"www" in a website address: Why it matters to website success

"www.mcbuzz.com" and "mcbuzz.com" -- what's the difference? None, right? Put either one in your browser's address window and you go to the same website.

No. Not exactly.

Business owners and others who want to be found on the Web should be aware that although http://www.mcbuzz.com and http://mcbuzz.com take you to the same website, www.mcbuzz.com and mcbuzz.com are, strictly speaking, different domains.

Strange as this may sound, here is why it matters to web marketing & website success. The two domains can have different rankings in a search engine like Google. Not only that, one can actually detract from the rank of the other.

How? Because when another website links to yours, it will either use www.example.com or example.com in the link URL (the web address).

Incoming links are a critical part, some would say the most critical part, of a web page's ranking in Google.

So, if half of the sites that link to yours use "www." and half do not, the positive effect on your site's ranking will be divided between the two domains.

Put another way, if all of the sites that link to your website use "www." in the link URL (http://www.mcbuzz.com instead of http://mcbuzz.com, say), then all of the positive effect on your site's ranking will be assigned to www.mcbuzz.com and its subpages.

There are several ways to make sure that visitors to your site all go to the same domain. You can start by making sure that you, or whoever works on your website, is consistent in creating URLs for the site. That way you ensure, at least to a significant degree, that incoming links to your site will all have the same form.

There are also some technical solutions you can use to change non-www. addresses into www. addresses on your website's host server. These are slightly complicated, "don't-try-this-at-home" kinds of things that I will write more about in the future. In the meantime, contact me through the McBuzz Communications Web site and I will help you with those. No purchase necessary.

Labels: , , , , , ,