Forum Moderators: Robert Charlton & goodroi

Message Too Old, No Replies

302 redirect and google cache

why goolge caches the destination url with 302 redirect

         

kunwarbs

5:14 am on Sep 20, 2007 (gmt 0)

10+ Year Member



I had put a 302 redirect on one of my subdomain which is forwarded to /subdomain/

a) Now when i see the cache for the subdomain url, google shows the destination page in cache, which is fine with me.

b) but when i type in the subdomain url in the google search box, it still shows the /subdomain/ url in the result

On the other hand, if you see the http headers for www.orkut.com, its redirected with 302 redirect to
[google.com...]
service=orkut&continue=http%3A%2F%2Fwww.orkut.com
%2FRedirLogin.aspx%3Fmsg%3D0%26page%3Dhttp%253A%252F
%252Fwww.orkut.com%252F&hl=en-US&passive=true
But when you enter orkut.com in the google search box, you see the orkut url and the orkut page cache only?

why this? how can i do the same for my pages? I am using 302 redirect with <meta> refresh tag.

Header results for my page

#1 Server Response: http://subdomain.example.com
HTTP Status Code: HTTP/1.1 302 Found
Date: Thu, 20 Sep 2007 05:11:00 GMT
Server: Apache Webserver
Location: http://www.example.com/subdomain/
Connection: close
Content-Type: text/html; charset=iso-8859-1
Redirect Target: http://www.example.com/subdomain/

#2 Server Response: http://www.example.com/subdomain/
HTTP Status Code: HTTP/1.1 200 OK
Date: Thu, 20 Sep 2007 05:11:00 GMT
Server: Apache Webserver
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Pragma: no-cache
X-Powered-By: PHP/4.4.7
Set-Cookie: PHPSESSID=347dff3caf63ec67da5a9e020f7fa3b1; path=/
Connection: close
Content-Type: text/html

pls suggest

[edited by: tedster at 5:55 am (utc) on Sep. 20, 2007]
[edit reason] switch to example.com, deactivate links [/edit]

tedster

6:15 am on Sep 20, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



With a 302 redirect to a url on the same domain, Google caches the content of the destination page with the url of the original page. Even though the Orkut example is across two different domains, there's still more going on here than that.

It sounds like you are allowing the subdirectory url to resolve directly, as well as using a 302 redirect on the subdomain. What I think you need is a 301 redirect from the subdomain - that will ensure that your subdomain is no longer indexed, only the destination directory form of the URL.