Forum Moderators: open

Message Too Old, No Replies

302 Redirects and Google

Does google effectively crawl a 302 redirect?

         

fiveofhearts

4:41 pm on Jun 7, 2003 (gmt 0)

10+ Year Member



I have a fairly new website that depends a lot on Google traffic, and I'm wondering if the 302 redirect on my entrance page has any effect on the googlebot or my page ranking.

On the website's home page, [mysite.com...] I have to run a few lines of script to send & check for cookies, then I've used the PHP header function to redirect it to the real homepage. Like this:

<?php
[some script]
header("Location: [mysite.com...]
?>

I know that google hates sneaky redirects, but there's nothing sneaky about this ... it is the same for all visitors and is simply used to send a cookie and then check for it on the next page. What, if any, effect will this have on my page rank and the googlebot?

Thanks for your help

n

Netizen

4:48 pm on Jun 7, 2003 (gmt 0)

10+ Year Member



Does your site rely on cookies that much that you have to check for them straight away? (not answering your question, I know, but as a user I find redirects like that annoying).

dmorison

4:49 pm on Jun 7, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi,

You should be OK, Googlebot has plenty of 302 in its diet.

In your case, you'll actually get the desired effect because Googlebot will index the content of your home.php page under the url [mysite.com...] - meaning that a visitor finding your site via Google will still go through your cookie testing magic etc.

Just make sure that spiders can get through OK aswell.

Netizen

5:06 pm on Jun 7, 2003 (gmt 0)

10+ Year Member



As dmorison said, just be careful spiders can get in. If you check for the presence of a cookie on the home page and it's not there, what happens? SE spiders don't represent cookies (or store them).

fiveofhearts

5:23 pm on Jun 7, 2003 (gmt 0)

10+ Year Member



Spiders and non-cookie users still can see the whole site. The reason for the cookies is mainly for an internal tracking database, that allows me to track certain attributes of users.

Thanks for the advice.

Netizen

9:20 am on Jun 8, 2003 (gmt 0)

10+ Year Member



In that case I'm not sure why you need the redirect in the first place.

vincevincevince

9:43 am on Jun 8, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You don't have a proper 302 there...
You need to be using 301 for google, and not 302 anyway:

header("HTTP/1.0 301 Moved Permanently");
header("Location: newpage.php");

(as i recall)

Richie

12:05 pm on Jun 8, 2003 (gmt 0)

10+ Year Member



"You don't have a proper 302 there...
You need to be using 301 for google, and not 302 anyway:"

That means the url in SERPs would be www.site.com/home.php. If you use 302 (Moved Temporarily) Google will list www.site.com instead.

This is good however Easyspace use 302 instead of 301 for their url redirect features. So Google now lists my old domain, which is always updated with text from the new site, and the new domain. Sometimes on the same SERP :(

dmorison

12:25 pm on Jun 8, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I think 302 is the way to go in fiveofhearts case. You want Google to index the content of home.php but still direct visitors to "/", which is what will happen.

CWright

4:58 am on Jun 8, 2003 (gmt 0)

10+ Year Member



I recently renamed quite a few pages on my site. I use 301 redirects to send the user to the new page. However, Google lists both URLs in its results for some of the pages. I hope the Google algo does not think that I have duplicate pages in my site.

Will this problem go away after the indexes are rebuilt? Should I be concerned about the duplicate listing?

Thanks.

pageoneresults

5:14 am on Jun 8, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Hello CWright, make sure the server is returning the proper status code...

Server Header Checker [searchengineworld.com]

As long as the 301 is set up properly and is returning a 301 status from the server header, you should be fine. Google will eventually merge the two together and list the url that you are permanently redirecting to.

I've seen this happen with 301 and 404 pages and it usually is temporary.

speedmax

8:09 pm on Jun 7, 2003 (gmt 0)

10+ Year Member



Hi,
i changed my link structure couple weeks ago, i created a php script to redirect all the old urls to new urls, about (55k pages)

Browses catch all the new URL striaght away,

other crawlers do a good job Scooter, Ask jeeve/teoma, FAST, Inktomi they catch all the new URLs

But google freshbot catch the 301 redirect, but it doesn't follow the new URL, i kept following the apache log, but sadly google freshie never follow new link.

here is the Freshie Log
-----------------------------------------------
64.68.82.31 - - [08/Jun/2003:04:08:46 -0500] "GET /out/dated/url.html HTTP/1.0"
301 352 "-" "Googlebot/2.1 (+http://www.googlebot.com/bot.html)"
-------------------------------------------------------

Here is the redirect script[php].
------------------------------------------------------
header("HTTP/1.0 301 Moved Permanently");
header("Location: [domain.com...] ");
header("Connection: close");
--------------------------------------------------------

ANYONE? Please tell me what i did wrong, i want freshie get the New Web address as well

mcavic

8:20 pm on Jun 7, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You're doing it right, and Google should pick it up eventually. Historically, Freshbot behaves this way, and Deepbot picks up the new URL.

Of course, if Deepbot goes away, this will have to be fixed in Freshbot.

WarmGlow

9:30 pm on Jun 7, 2003 (gmt 0)

10+ Year Member



On May 13, 2003, GoogleGuy wrote: [webmasterworld.com]

Hmm. I'll ask about the 301's with freshbot.

He has not yet reported back on this issue.

speedmax

6:49 am on Jun 8, 2003 (gmt 0)

10+ Year Member



it seems like freshbot keep trying to get the old URL again and again, However, it doesn't follow the New location.

It seems like this is born-shortness, googleguy
any sigh that google is fixing this?

swones

10:32 am on Jun 8, 2003 (gmt 0)

10+ Year Member



I'm glad this point has been raised, I was beginning to think I was doing something wrong as Freshie never followed the 301. What I actually often see is this, feshie comes in to a 301 redirected domain name asks for robots.txt and gets a 301, then asks for / and gets another 301, then it asks for robots.txt at the new location and gets a 200 but then never asks for / at the new location. Is that what everyone else gets?

Simon.