War Room

Go Back   WarriorForum - Internet Marketing Forums > The Warrior Forum > Adsense / PPC / SEO Discussion Forum

Featured Warrior Special Offer...
"Members Of The *War Room* Discover Secrets To Immediate Success!"
Reply
 
LinkBack Thread Tools
Old 10-27-2009, 06:45 AM   #1
HyperActive Warrior
 
Join Date: Feb 2005
Location: , , USA.
Posts: 169
Thanks: 1
Thanked 0 Times in 0 Posts
Default 301 Redirect Question!

Hi Warriors,

Let's say that I have a website and you can access the content as below...This will create duplication issues in Google if I understood it correctly.

www.abc.com
www.abc.com/index.html
www.abc.com/index.asp
www.abc.com/
abc.com
www.abc.com/home.html

From my understanding, to solve the issue I would have to create a 301 redirect to tell Google my preferred URL version.
So would this be the correct code to take care of all the canonical issues above so Google will recognize that www.abc.com is the referred version by putting this in the .htaccess file? Or is there anything else that is needed? Also would this be applicable to all sites (asp,php,html, jsp etc)?

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


Appreciate Your Help..

Many Thanks,

Chloe

Make $20-$75/Hour to fill out online surveys, get paid to read e-mails,
shop, eat at your favorite restaurant, and fly around the world for next to nothing.
www.secretshopperclub.com
Become my partner - Make 50% in commission of all sales referred http://www.secretshopperclub.com/amember/affsignup.php
Chloe Brooks is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 10-28-2009, 04:31 AM   #2
HyperActive Warrior
 
Join Date: Mar 2009
Location: Watford, England
Posts: 163
Thanks: 2
Thanked 4 Times in 4 Posts
Social Networking View Member's Twitter Profile 
Default Re: 301 Redirect Question!

I think this problem is less important than it once was. Google know's that so many sites have www.mydomain.com and www.mydomain.com/index that it's aware they are not all scammers.

I can't help you with code though I'm afraid but I wouldn't say if in doubt just do each iteration seperatly.

SEO Hertfordshire
......If I've said something you don't understand please ask :).....

Last edited by distinctly_digital; 10-28-2009 at 04:59 AM. Reason: typo
distinctly_digital is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 10-28-2009, 05:10 AM   #3
Active Warrior
War Room Member
 
Join Date: Oct 2009
Posts: 29
Thanks: 0
Thanked 5 Times in 5 Posts
Default Re: 301 Redirect Question!

Hi,

Adding redirect rules to the .htaccess file is best.

The following code will redirect users (as well as Google) to the www version of the website as well as redirect index webpages to the standard root /

RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\.abc\.com$ [NC]
RewriteRule ^(.*)$ http://www.abc.com/$1 [L,R=301]
redirect 301 /index.html http://www.abc.com/
redirect 301 /index.asp http://www.abc.com/
redirect 301 /home.html http://www.abc.com/

Hope this helps.




Article AutoTasker - Article Creation Using Anonymous Humans!
netfq is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
The Following User Says Thank You to netfq For This Useful Post:
Old 10-29-2009, 01:28 AM   #4
HyperActive Warrior
 
Join Date: Feb 2005
Location: , , USA.
Posts: 169
Thanks: 1
Thanked 0 Times in 0 Posts
Default Re: 301 Redirect Question!

Thanks a lot Netfq,
So basically the below script will work on all websites (php,asp,html, jsp etc)?

So if I want to make sure that people who type in abc.com without the www and I want this 301 redirect to www.abc.com, should I just add that to the below and if so how?


RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\.abc\.com$ [NC]
RewriteRule ^(.*)$ http://www.abc.com/$1 [L,R=301]
redirect 301 /index.html http://www.abc.com/
redirect 301 /index.asp http://www.abc.com/
redirect 301 /home.html http://www.abc.com/

Thanks a million
Chloe

Make $20-$75/Hour to fill out online surveys, get paid to read e-mails,
shop, eat at your favorite restaurant, and fly around the world for next to nothing.
www.secretshopperclub.com
Become my partner - Make 50% in commission of all sales referred http://www.secretshopperclub.com/amember/affsignup.php
Chloe Brooks is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 10-29-2009, 03:33 AM   #5
Active Warrior
War Room Member
 
Join Date: Oct 2009
Posts: 29
Thanks: 0
Thanked 5 Times in 5 Posts
Default Re: 301 Redirect Question!

Quote:
Originally Posted by Chloe Brooks View Post
So basically the below script will work on all websites (php,asp,html, jsp etc)?
No.. It will only work on apache servers which have modrewrite installed.

Quote:
Originally Posted by Chloe Brooks View Post
So if I want to make sure that people who type in abc.com without the www and I want this 301 redirect to www.abc.com, should I just add that to the below and if so how?
Just add the following lines to the bottom of your .htaccess file:

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

Article AutoTasker - Article Creation Using Anonymous Humans!
netfq is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 10-29-2009, 06:22 AM   #6
HyperActive Warrior
 
Join Date: Feb 2005
Location: , , USA.
Posts: 169
Thanks: 1
Thanked 0 Times in 0 Posts
Default Re: 301 Redirect Question!

Thanks a lot

So what about the other versions below as well as the version without the www?

http://www.abc.com/index.php
http://www.abc.com/home.php
http://abc.com/
abc.com

etc

So how would I put all these together in the htaccess file?

So sorry for my lack of knowledge here..

Thanks a bunch,
Chloe

Make $20-$75/Hour to fill out online surveys, get paid to read e-mails,
shop, eat at your favorite restaurant, and fly around the world for next to nothing.
www.secretshopperclub.com
Become my partner - Make 50% in commission of all sales referred http://www.secretshopperclub.com/amember/affsignup.php
Chloe Brooks is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 10-29-2009, 06:32 AM   #7
Active Warrior
War Room Member
 
Join Date: Oct 2009
Posts: 29
Thanks: 0
Thanked 5 Times in 5 Posts
Default Re: 301 Redirect Question!

Quote:
Originally Posted by Chloe Brooks View Post
So how would I put all these together in the htaccess file?
See my previous post here: 301 Redirect Question!

Article AutoTasker - Article Creation Using Anonymous Humans!
netfq is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 10-30-2009, 09:46 AM   #8
HyperActive Warrior
 
Join Date: Feb 2005
Location: , , USA.
Posts: 169
Thanks: 1
Thanked 0 Times in 0 Posts
Default Re: 301 Redirect Question!

Thanks Netfq,
This (creating htaccess files) seems to work for websites in php and html (sites that use a linux server). What about websites that use ASP how would that be implemented?

So in this case lets say I have the below versions:

www.abc.com/index.asp
abc.com.asp
www.abc.home.asp

and I want them all to 301 to www.abc.com

Sorry for bothering you again for this...

Millions of thanks
Chloe

Make $20-$75/Hour to fill out online surveys, get paid to read e-mails,
shop, eat at your favorite restaurant, and fly around the world for next to nothing.
www.secretshopperclub.com
Become my partner - Make 50% in commission of all sales referred http://www.secretshopperclub.com/amember/affsignup.php
Chloe Brooks is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 11-02-2009, 03:21 AM   #9
Active Warrior
War Room Member
 
Join Date: Oct 2009
Posts: 29
Thanks: 0
Thanked 5 Times in 5 Posts
Default Re: 301 Redirect Question!

Quote:
Originally Posted by Chloe Brooks View Post
Thanks Netfq,
This (creating htaccess files) seems to work for websites in php and html (sites that use a linux server). What about websites that use ASP how would that be implemented?
Windows IIS servers do not use .htaccess so therefore the above solution will not work. I've never used this setup on an IIS server before but I know there are ISAPI filters you can use to manipulate the URL etc.

Have a look at: Helicon Tech - IIS modules and ISAPI filters for URL rewriting and search engine optimization

Article AutoTasker - Article Creation Using Anonymous Humans!
netfq is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

  WarriorForum - Internet Marketing Forums > The Warrior Forum > Adsense / PPC / SEO Discussion Forum

Tags
301, question, redirect

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



All times are GMT -6. The time now is 01:03 PM.