Go Back   WarriorForum - Internet Marketing Forums > The Warrior Forum > Adsense / PPC / SEO Discussion Forum
Register Blogs FAQ Social Groups CalendarHelp Desk

Reply
 
LinkBack Thread Tools
Old 08-30-2011, 04:14 PM   #1
Active Warrior
 
Join Date: Jul 2011
Posts: 52
Thanks: 3
Thanked 3 Times in 3 Posts
Default is this 301 redirect OKAY ??

Hi, numerous resources suggest this exact redirect code for the .htaccess file if you want non-www to redirect to www:
RewriteCond %{HTTP_HOST} ^example\.com [NC]
RewriteRule ^(.*) http://www.example.com/$1 [R=301,L]

However, I've been worried about "duplicate content" because my homepage gets displayed even when the "www" is messed with, for example:
www3.example.com
abcdef1234.example.com

So over at the apache forums, they suggested this:
RewriteCond %{HTTP_HOST} !^(www\.example\.com)?$
RewriteRule ^(.*) http://www.example.com/$1 [R=301,L]

That does work. However, before I implement it, I wanted to make sure it is "SEO friendly," e.g. it's not doing something horrible for the search engines that I don't know about yet.

What do you guys think?
oldvintageguy is offline   Reply With Quote
Old 08-30-2011, 04:34 PM   #2
Senior Warrior Member
War Room Member
 
Michael Nguyen's Avatar
 
Join Date: Jan 2009
Location: London
Posts: 1,055
Thanks: 63
Thanked 151 Times in 106 Posts
Default Re: is this 301 redirect OKAY ??

Quote:
Originally Posted by oldvintageguy View Post
Hi, numerous resources suggest this exact redirect code for the .htaccess file if you want non-www to redirect to www:
RewriteCond %{HTTP_HOST} ^example.com [NC]
RewriteRule ^(.*) http://www.example.com/$1 [R=301,L]

However, I've been worried about "duplicate content" because my homepage gets displayed even when the "www" is messed with, for example:
www3.example.com
abcdef1234.example.com

So over at the apache forums, they suggested this:
RewriteCond %{HTTP_HOST} !^(www.example.com)?$
RewriteRule ^(.*) http://www.example.com/$1 [R=301,L]

That does work. However, before I implement it, I wanted to make sure it is "SEO friendly," e.g. it's not doing something horrible for the search engines that I don't know about yet.

What do you guys think?
I've been studying regular expression so I can comment. Its perfectly fine. What you're doing is telling Google which is preferred which is the www.version and only www.

If it redirects with ie www3.domain.com then you're fine.

Michael Nguyen is offline   Reply With Quote
Old 08-30-2011, 05:15 PM   #3
Plundering the Web
War Room Member
 
paulgl's Avatar
 
Join Date: Feb 2007
Location: , , .
Posts: 4,851
Thanks: 804
Thanked 1,200 Times in 887 Posts
Default Re: is this 301 redirect OKAY ??

It's not duplicate content. it's the same page. Just multiple
ways of getting there.

A 301 in that case is not really SEO, although many mix it up.

It's just your preferred way of getting there. If you don't build
consistent backlinks, then google will just choose which one
makes more sense to them. It "looks" like they are different pages.
It does not mean that they are different. Google is a pretty
smart cookie in this regard. Whether you 301 or not, it does
not solve people's perceived problems about the page appearing
to be a different page to search engines.

Thinking there is a problem, and putting a band aid on the problem,
is not really SEO if it's not really a problem. Right?

It's no big deal.

You see a lot of people claiming the sky is going to fall, but
no such thing happens.

domain.com, domain.com/ domain.com/index.php, www. domain.com,
www .domain.com/ www .domain.com/index.php, and many, many
others are the same page.

The only way you get in trouble is for type in traffic. If your
www. subdomain does not exist due to the way the server was
set, and you don't do a 301, and people type www. first, the
site will be non-existent.

None of this is duplicate content, nor anything to worry about
for 99.99999999999999999999999999% of normal websites.

You can also do this another way, using rel="canonical"

Just google it. It's actually a pretty neat line of code that many
people don't know about.

Paul

How to Make Money off Facebook: Login to your account. Deactivate your account. Get your butt to work.
paulgl is offline   Reply With Quote
Old 08-30-2011, 06:13 PM   #4
Senior Warrior Member
War Room Member
 
Michael Nguyen's Avatar
 
Join Date: Jan 2009
Location: London
Posts: 1,055
Thanks: 63
Thanked 151 Times in 106 Posts
Default Re: is this 301 redirect OKAY ??

just to add, if these urls were to be indexed
www3.example.com
abcdef1234.example.com

aswell as your main url www.example. com, then
that WOULD be duplicate content.

Stick the code into the htaccess file you should be
good.

Michael Nguyen is offline   Reply With Quote
Old 08-30-2011, 06:35 PM   #5
Active Warrior
 
Join Date: Aug 2010
Location: No fixed location
Posts: 67
Thanks: 15
Thanked 4 Times in 4 Posts
Default Re: is this 301 redirect OKAY ??

how about linkjuice? I know the standard answer is that the link juice gets transferred to the new url, but does anyone have experience doing this? If so were there any changes noticed?
riza is offline   Reply With Quote
Old 08-30-2011, 08:21 PM   #6
Active Warrior
 
Join Date: Jul 2011
Posts: 52
Thanks: 3
Thanked 3 Times in 3 Posts
Default Re: is this 301 redirect OKAY ??

Quote:
Originally Posted by Michael Nguyen View Post
just to add, if these urls were to be indexed
www3.example.com
abcdef1234.example.com

aswell as your main url www.example. com, then
that WOULD be duplicate content.

Stick the code into the htaccess file you should be
good.
Michael, hi, thank you for your answer. And, yes! abcdef1234.example.com DID get indexed -- that's how I discovered it

When I was looking up my own website (e.g. "site:www.mysite.com"), you know those little snippet things under your domain name where the search engine lists all my main pages, well, one of them looked just like this:
anotherwebsiteNamewww.mysite.com/mypage.html. It sure spooked me, and I wanted it fixed, but no matter what redirect I tried, nothing worked, until I went over to the apache forum. Thank you for reviewing my code.
oldvintageguy is offline   Reply With Quote
Old 08-30-2011, 08:33 PM   #7
Internet Savvy
 
arnie19's Avatar
 
Join Date: Jul 2011
Location: Philippines
Posts: 110
Thanks: 3
Thanked 8 Times in 6 Posts
Social Networking View Member's Twitter Profile 
Default Re: is this 301 redirect OKAY ??

Temporarily, you'll dropped rankings. but will return. Not sure how long though.

GOOD, BETTER and BEST;. Never let it rest,. until your GOOD is BETTER, and your BETTER is BEST!....
arnie19 is offline   Reply With Quote
Old 08-30-2011, 08:40 PM   #8
Execution
 
Join Date: Jan 2011
Posts: 39
Thanks: 3
Thanked 2 Times in 2 Posts
Contact Info
Send a message via Yahoo to Incoan Send a message via Skype™ to Incoan
Default Re: is this 301 redirect OKAY ??

Uhmm...I did 301 redirects once to change permalinks. Didn't drop in rankings at all.
Incoan is offline   Reply With Quote
Old 08-31-2011, 01:39 AM   #9
Internet Savvy
 
arnie19's Avatar
 
Join Date: Jul 2011
Location: Philippines
Posts: 110
Thanks: 3
Thanked 8 Times in 6 Posts
Social Networking View Member's Twitter Profile 
Default Re: is this 301 redirect OKAY ??

Quote:
Uhmm...I did 301 redirects once to change permalinks. Didn't drop in rankings at all.
Are those pages reindexed? Well to me, it happen, 301 redirect from non-www to www. after a month.booom!! I'm gone. but after a couple of months,I'm back. I think it depends on pages you have since mine before, I had lots of pages and it took time to get them reindexed again. Anyway, no doubt that you won't have a problem since google advices 301 redirect.
arnie19 is offline   Reply With Quote
Reply

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

Tags
301, 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:09 PM.