Msg#: 3521055 posted 5:42 pm on Dec 5, 2007 (gmt 0)
I need to delete hundreds and eventually a few thousand records from a dynamic site that will result in 500 errors. Right now I have a custom 500 error page set up. Is this the best way to handle this? How long will Google try to index the URLs before realizing the pages no longer exist and drop them from the index?
Msg#: 3521055 posted 7:14 pm on Dec 5, 2007 (gmt 0)
A 500 status will any spider that there's an internal server error - and any bot may keep spidering indefinitely to see if the error's been handled and the page is now available. It's better for search engines (and more accurate) to find a way to return either a 404 or 410 status - "not found" or "gone".
Googlebot will still keep trying to spider these urls - sometimes for over ayear - but with decreasing frequency. Addtionally, if you want to see those 404 or 410 status urls completely dropped from search results quiuckly, you can easily request that and have it happen. Not so with a 500 error.
Msg#: 3521055 posted 7:33 pm on Dec 5, 2007 (gmt 0)
Well there's no way I can return a 404 on these pages, right? So it seems my only option is to show the friendly 500 page and wait a long time until these pages are gone or keep the pages with the message that the 'widget' is no longer available. (not preferred)
Msg#: 3521055 posted 1:11 am on Dec 7, 2007 (gmt 0)
Yes, it is a technical server-side issue and not really a Google Search forum issue. I'd suggest posting your technical question in the most appropriate of our technical forums - some likely candidates:
Msg#: 3521055 posted 5:46 pm on Dec 7, 2007 (gmt 0)
you need to do something along these lines:
'This code assumes your SQL connection is open and the 'object is named "objado". You also need to have page buffering enabled in the IIS Manager or at the top of the page do a response.buffer=true
set rs = objado.execute(insert-sql-statement-here)
if rs.eof or rs.bof then
response.clear response.status = "404 - Page not found" 'or 410 - Gone your choice response.write "insert your friendly HTML error code here" 'clean up open object references rs.close set rs = nothing objado.close set objado = nothing response.end