301 Permanent Redirect
301 Permanent Redirect
Have you ever had a search engine emergency? Well, I didn’t think it was possible, but I just had one.
I had a client call me bright and early today and inform me that all of his main positions had fallen out of Google. That’s not news you want to hear.
I checked and sure enough all the big phrases were gone. I had to run off to a meeting and told him it might be a problem at Google.
As I was driving to and back from the meeting I was thinking all this through. What could have possibly happened?
When I got back to the office, I ran a search on Google to see all of the pages they have indexed from the site.
Incidentally, I did this by doing this search:
site:www.company.com -lsosoos
This shows all of the pages on www.company.com that don’t have the phrase “lsosoos”. So, basically, it shows all of his pages that are registered in Google.
What to my wondering eyes did appear? His home page was not listed and an identical page was swapped out in its place.
The main home page is titled Default.asp and this new page was Default1.asp… and it had no title!
This looked to be a page that possibly his developer was using to test the layout of the home page. It, somehow, got indexed. And because it was indentical to the home page, Google chose to index that page instead of the home page. So there went all of his link popularity and his title.
Viola, no listings.
This is what I did to fix the problem. It’s real easy. This is on a Windows server. So all I did was replace the Default1.asp with a file that simply had this in it:
<%
Response.Status = “301 Permanent Redirect”
Call Response.AddHeader (”Location”,”http://www.company.com/Default.asp”)
Response.End
%>
Now, when Google comes to that page they will see that it is permanently redirected to the home page. This should do the trick.
The 301 is an important code for an engine. Doing a simple redirect might not have the same impact.
You can learn more about HTTP status codes and redirects here.
And you can check to make sure the statis code is correct here:
Server Header Checker
Hope this helps you if you ever have a search engine emergency.