![]() | | ||||||||
| | #1 |
| Active Warrior Join Date: Jul 2011
Posts: 52
Thanks: 3
Thanked 3 Times in 3 Posts
|
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? |
| | |
| | #2 | |
| Senior Warrior Member War Room Member Join Date: Jan 2009 Location: London
Posts: 1,055
Thanks: 63
Thanked 151 Times in 106 Posts
| Quote:
If it redirects with ie www3.domain.com then you're fine. | |
| | ||
| | |
| | #3 |
| Plundering the Web War Room Member Join Date: Feb 2007 Location: , , .
Posts: 4,851
Thanks: 804
Thanked 1,200 Times in 887 Posts
|
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.
| |
| | |
| | #4 |
| Senior Warrior Member War Room Member Join Date: Jan 2009 Location: London
Posts: 1,055
Thanks: 63
Thanked 151 Times in 106 Posts
|
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. |
| | |
| | |
| | #5 |
| Active Warrior Join Date: Aug 2010 Location: No fixed location
Posts: 67
Thanks: 15
Thanked 4 Times in 4 Posts
|
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?
|
| | |
| | #6 | |
| Active Warrior Join Date: Jul 2011
Posts: 52
Thanks: 3
Thanked 3 Times in 3 Posts
| Quote:
![]() 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. | |
| | |
| | #7 |
| Internet Savvy Join Date: Jul 2011 Location: Philippines
Posts: 110
Thanks: 3
Thanked 8 Times in 6 Posts
|
Temporarily, you'll dropped rankings. but will return. Not sure how long though.
|
| | |
| | |
| | #8 |
| Execution Join Date: Jan 2011
Posts: 39
Thanks: 3
Thanked 2 Times in 2 Posts
|
Uhmm...I did 301 redirects once to change permalinks. Didn't drop in rankings at all.
|
| | |
| | #9 | |
| Internet Savvy Join Date: Jul 2011 Location: Philippines
Posts: 110
Thanks: 3
Thanked 8 Times in 6 Posts
| Quote:
| |
| | |
![]() |
|
| Tags |
| 301, redirect |
| Thread Tools | |
| |
![]() |