Kryptronic Software Support Forum

You are viewing this forum as a guest. Login to an existing account, or create a new account, to reply to topics and to create new topics.

#1 11-29-2005 14:26:05

Ed_H
Member
From: Smashachusetts
Registered: 09-12-2003
Posts: 397
Website

Www And Non-www

This is a pretty simplified explanation, but Google has had canonical url and duplicate content issues for some time.  One of these is that if your domain resolves to both the www and non-www versions it may be seen as duplicate content (therefore penalized) even though it's the same site.

One solution is to use mod_rewrite in the .htaccess file to permanently (301) redirect the non-www version to the www version.  Here is an  on a unix/apache server:

Code:

Options +FollowSymLinks
RewriteEngine On

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

Offline

 

#2 01-18-2006 09:52:50

osluk
Member
Registered: 07-22-2005
Posts: 166

Re: Www And Non-www

So I can try this out.
We use a subdomain admin.oursite.com

To avoid wwwadmin.oursite.com complicating thisngs and appearing in logs etc
how would I modify this .htacess file?

Would this need to go into the root of each folder to avoid a user typing in wwwadmin.oursite.com/subfolder of is this recurrsive and protects folders below?

Cheers Chris

Offline

 

Board footer