Forum Moderators: Robert Charlton & goodroi
I have a couple things I would like to clarify on 301's via this example:
A site currently has no redirect - google sees both widgets.com (PR 7) and www.widgets.com (PR 6).
It seems like this site should do a 301 redirect to widgets.com (the higher PR ranking).
Here are my questions:
1) Might this give the site an overall boost in PR?
2) What is the short-term effect of making this change (could it change your rankings and for how long)?
3) Is www. better than non-www?
Also, if you recently made this change yourself - how did it go? Thanks for your help!
I would hold off on doing any redirects now, or changing any redirects. The new PR update fiasco has changed the www and non-www values for some, so you're going to have to keep watching that for a while. 4 of my 5 sites had higher PR on the www versions, now as of today, it's the OPPOSITE. All those that did these 301 redirects have now hurt themselves if this same thing happened to them--they'd now be having their HIGHER PR page going to the LOWER PR page.
Showing your content under two different URLs is never a good idea. Get the redirect in place as soon as possible.
The reason that you have some of your incoming links going to non-www and others to www is that your site always returned "200 OK" for whatever you tried to access it by. By now providing a redirect, people will naturally link to you using the one that you want to be used. Make sure that all of your internal links go to the correct one too.
...but the PR for the two will be added together when Google sees that the two URLs are for one and the same page.
Please see: [webmasterworld.com...] for multiple references to posts, threads, etc. supporting this.
Justin
I've seen lots of info on how to do the 301 redirect on Apache - but can't find any info on how to implement the same thing on IIS. Anyone know, or point me in the right direction?
Secondly, if it's duplicate content that's the problem (ie the same page under different URLs) - isn't the fact that IIS isn't case-sensitive, and Google is case-sensitive a problem?
For example - I create one page:
www.mydomain.com/widgets.asp
I can do my best to link consistantly to this - but I can't control other people. So if I get links to:
widgets.asp
Widgets.asp
WIDGETS.asp
WidGets.asp
then Google thinks I've got 4 pages of duplicate content - when in fact I've only got one.
I can't think of a solution to this second problem...
[webmasterworld.com...]
You might also try: Redirecting IIS site:webmasterworld.com in your favorite search engine.
The second question is yes, that can, could, at sometime probably will be a problem.
Unfortunately, I do not work with IIS to be able to help you, except in that maybe when you find the code for redirecting, you can A) use that to catch the case? don't know on this one. B) Use a header function on the actual asp pages to catch the header and redirect it to the correct (non-cap) location... I again am not sure on this - I know it can be done with php $SERVER and a stringtolower() capabilities.
Sorry I couldn't help more.
Justin
First an apology. I know that there are dozens of threads about 301 redirects. I have read all of them that I could hunt down, but I still can't make this work for my site. If anyone has the patience and know-how, I will be extremely grateful.
My site has 10 sections off of the main directory. I noticed yesterday that google has given all of these sections a PR5 on the www site and PR1 on the non-www site. From what I've been reading, that PR could go higher, if only I could redirect with success!
The site is in ASP and runs on a shared Windows server. I called the host and asked them for access to the IIS platform and they laughed at me. It's only possible, I therefore gathered, to set up 301 redirects to the individual pages.
I have decided to put redirects on each of the these section home pages (http://widgets.com/section1/default.asp).
So, I followed the advice in this thread and added the following code:
<%@ Language=VBScript %>
<%
Response.Status="301 Moved Permanently"
Response.AddHeader "Location", "http://www.widgets.com/section1/"
%>
---
It didn't work. I changed it to "http://www.widgets.com/section1/default.asp" and it still didn't work.
It's at the top of the page, above the <HTML> tag.
I would be most grateful for any help on this.
One problem - you need to test that the person has arrived at the page asking for the domain.com version of the page and only serve the redirect to them. If you serve the redirect to www.domain.com when the visitor was asking for that anyway, then they will get caught in an infinite loop.
You say that I should test to make sure that only those asking for domain.com/page.asp get the www redirect. How do I do that? It's the same page, right? Is there another piece of code that goes with this script that can tell if visitors have requested the non-www page?
Just ask them to host domain.com also and then setup a permanent redirect for this domain to www.domain.com. This can be done in 2 minutes by the host admin who has access to the IIS admin panel.
They would already know how to do this but if they don't, you can search for "IIS 301 redirect" and look up the results. A few sites explain this with snapshots of the admin console.
If unavoidable, you may consider paying them a fee for this also. It is much more efficient and quicker than setting up redirects on all your pages.
The thing is, I always believed that there was a 301 redirect already set up on the server because when I type in [mysite.com...] it automatically takes me to [mysite.com....] Can anyone give any advice as to what I should do? I can write a htaccess and put the redirect in there but as far as I can see this is already in place.
When putting in [mysite.com...] it shows a 200 OK status. Why is Google caching 2 versions of the site?
My website that ranked well for 3 years was recently dropped on Google for every phrase that it ranked well for. When I tried a allinurl: command I can see dozens of supplemental results for the site - each one being a non www. duplicate. Could this be causing the problem?
The thing is, I always believed that there was a 301 redirect already set up on the server because when I type in [mysite.com...] it automatically takes me to [mysite.com....] Can anyone give any advice as to what I should do? I can write a htaccess and put the redirect in there but as far as I can see this is already in place.
You don't think you dropped due to the Bourbon update? I know of several people that dropped in Bourbon, NEVER DID the 301 redirect and got back the pre-Bourbon SERP's.
You obviously have some kind of redirect going on if mysite.com goes to www.mysite.com, you don't know how to check your .htaccess file for that?
You next post indicates you have a 302 which is not good.
If, IF you want the 301 redirect from non-www to www, you should have this in your .htaccess file:
RewriteEngine on
RewriteCond %{HTTP_HOST} .
RewriteCond %{HTTP_HOST} !^www\.MyDomain\.com
RewriteRule (.*) [MyDomain.com...] [R=301,L]
[edited by: ciml at 6:59 pm (utc) on July 21, 2005]
[edit reason] Space missing from RewriteCond [/edit]
The thing is, I tried using the amended htaccess file and it will not override what the host has done at the root with the 302. I think I need to move hosts.
Thanks very much Clint. My HTACCESS file was missing R=301.
I don't think it had anything to do with Bourbon as the site bummed out on 2nd July, I believe the update was long before then?
Welcome. ;)
The update was different for different people. It didn't affect me until May 21st, some it affected weeks before that and some long after May 21st. It's still going on from the looks of the G SERP's.
The thing is, I tried using the amended htaccess file and it will not override what the host has done at the root with the 302. I think I need to move hosts.
Not sure what you mean by "amended htaccess file". The .htaccess file should be in your root folder/directory and if it has something in it that did your previous redirect those lines are first going to have to be removed before the new lines will work. The line RewriteEngine on just needs to be in the file once, so you remove that line from what I posted if the line is already in the file, and the other lines have to go below it with a space before and after it:
[space]
RewriteEngine on (add that if it's not already there)
RewriteCond %{HTTP_HOST} .
RewriteCond %{HTTP_HOST} !^www\.MyDomain\.com
RewriteRule (.*) [MyDomain.com...] [R=301,L]
[space]
("Hot Link protection" lines if any)
[probably a space]
("IP Deny" lines if any), etc.
In my htaccess file, I have IP Deny lines above the redirect since they were already there, I just put my redirect directly below my existing RewriteEngine on since it was there above the Hot Link protection lines. If you mess with your file, be sure and first make a copy of it. If your previous 302 lines are not in your htaccess file then you're going to have to ask your hosts about it.
[edited by: ciml at 6:59 pm (utc) on July 21, 2005]
[edit reason] Space missing from RewriteCond [/edit]
Hmm, that date is significant. If I remember rightly, that is the date that all the previously fixed listings (on the site that had a redirect first installed in March, and which took until early May to be fixed {all www to be dropped, only non-www then listed}) were suddenly reverted back to how they were at the end of last year, with cache dates to match. The listings remained incorrect for several weeks, and then fixed themselves on their own.