Hi, I use to be ranked number 1 for some keywords for my domain (e.g.domain1.com), I recently noticed that I had had some 302 redirect from my other domain (domain2.com), (well quite a alot I estimate upto 200), however since end of last week my my first domain has severly lost its ranking from 1 down to 20 or lower (some ranking on some keywords seems to have dissappeared as well) and my domain2.com is ranked 4-5 position for my old terms. I have now put a dissallow in the robots.txt for the redirect script url which was listed and changed the links to direct links. Could someone confirm is this due to the 302 redirect. Also what should I do? Also will I get my listing back? other info: domain1.com (PR4) domain2.com (PR5) If you need any clarification please let me know. thanks
What do you mean "you recently noticed" Did you put the redirect there or not? If not, then you may have been hacked - and if you did, then get rid of it and explain what you were trying to achieve by using it.
302 Redirects don't go over well with search engines and they get confused. These redirects are also usually seen as a spammer technique, and everyone knows google hates spammers. They may even book it as duplicate content. As long as you now blocked those 302 redirects and changed them 301's, it should be good. It might take a little while to get back to where you were position wise, but you will still probably get back there.
On domain2.com i have a directory script and it came with the 302 redirects as standard when I purchased it, so it has had the 302 there since over 1 year but I only recently realised that these were a bad thing. I don't know how to change the 302 to a 301, as it is via a redirect script e.g. go.php?id=23 will the script have somewhere the number "302" for the redirect so that I can search for this? (is there some code I can look for to find the redirect) thanks for your advice
Look in go.php for something like header("Location: ..."); and add the following line before it: header('HTTP/1.1 301 Moved Permanently'); PHP: Cryo.
Correct me if I'm wrong but I think this is what you need to do. For each of the sites you want to redirect, enter in at the top of the page: <? Header( "HTTP/1.1 301 Moved Permanently" ); Header( "Location: http://www.whereveritlinksto.com" ); ?> PHP:
Hi, Thanks for your reply, just been looking through my code, and it has: header("Location: $url"); is it better to use your method and just add above it: Header( "HTTP/1.1 301 Moved Permanently" ); or do search engines like instead: <meta http-equiv=\"Refresh\" content=\"0; URL=$url\"> thanks
Search engines hate meta tag refreshes because it is client-side. We need to do the redirected on the server side, which PHP does. Add the 301 Moved Permanently header before using the Location header. This tells Search Engines that your page has permanently moved to the other site, and the search engine will transfer over the PageRank and other ranking stats to where the page links to.
do i keep the go.php in the robots.txt? is there a way to stop the pr transferring as I have other 3rd party sites? thanks
If you want to stop search bots from following the links to external sites, then yes put go.php in your robots.txt.