Forum Moderators: Robert Charlton & goodroi

Message Too Old, No Replies

302 redirection

         

SpudMonkey

2:07 pm on Jul 31, 2005 (gmt 0)



HI guys,

I've recently built a site which has been spidered by google twice. Each time it only accessed the index page.

The page www.mydomain/index.php consists of the following code

Code:
<?php
header("Location: site/welcome/");
?>

after checking the headers returned, the page gives a 302 (temporary redirection) code. It's come to my attention that this might be what's stopping Googlebot from spidering the rest of the site.

Is this the case? If so what's the best way round this?

encyclo

5:44 pm on Aug 1, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Welcome to the forums, SpudMonkey.

Let's just say that it won't help - but you should try to get more inbound links if you want your site better indexed.

For the redirect, you need to make sure it is a 301 Permanent redirect (or even better don't do it at all and have your site in the root folder).

<?php
header("HTTP/1.1 301 Moved Permanently");
header("Location: site/welcome/");
exit;
?>