Categorized | HTML

301 redirect to the “www” site

Posted on 06 September 2009 by anon

Fred Morgan – seoexploration.com

With the modern style of losing the “www” at the beginning of the website URL you may encounter problems – especially with statistical analysis programs.

I’m not really concerned with the semantics of whether one should or should not use the starting “www” but being of the old school I still tend towards using it.  These days most hosting facilities utilise the dual base directories of “public_html” and “www” where “www”  is the automatic clone of the “public_html” directory so, under normal circumstances, either URL will work fine.
However, I have seen browser cache problems give display problems identifying a difference between them  – i.e. missing favicon images and intermittent flash errors etc.  It took me a long time before I identified where the problem actually lay. Everyone always identifies the standard cache reload fix but not that you may be varying the actual URL (www) search which can happen when using previous saved browser shortcuts or bookmarks.

.htaccess

I always now use a 301 redirect with the following script in my .htaccess file which redirects my incoming URLs to www however this step should only be taken by those who understand that problems could follow if incorrect editing is done. Firstly create a backup copy of your original .htaccess file just in case things get messed up. Now add the following  3 lines of 301 redirection code
(note :
aaaaaaaa.bbb is tobe replaced by your website URL i.e.   okikoki.com)


RewriteEngine On

RewriteCond %{HTTP_HOST} ^aaaaaaaa.bbb
RewriteRule (.*) http://www.
aaaaaaaa.bbb/$1 [R=301,L]

Tags | , , , , , , , ,

Leave a Reply

You must be logged in to post a comment.

Link Popularity Check
How popular is your website?

example: www.host.com or host.com
URL: 1
URL: 2 *
URL: 3 *
Exclude your domain from result.

Send report to an e-mail address (optional).
Email
Send in HTML format.


Please enter the access code as displayed above.
Access code
* The second and third URL is optional.

Online Link Popularity Check provide by SEOCentro.

Keyword Density Checker

Enter a URL to analyze

Keyword Density Tool © SEO Chat™

URL
Valid URL

Results
Number of keyterms to display

Elements to include
Select from below
Include Meta?
Include Alts?
Include Title?

Include numerals
E.g. '2004' would count as a keyword
Yes
No

No. words
Number of words per phrase
3 words
2 words
1 word

Enter Captcha To Continue
To prevent spamming, please enter in the numbers and letters in the box below

Report Problem with Tool.

Blogroll

 

September 2009
M T W T F S S
« Aug   Dec »
 123456
78910111213
14151617181920
21222324252627
282930