views:

156

answers:

1

Hi Gang,

I have event entries in a php application with a permalink structure for the events. I'm creating a dynamic xml sitemap for google et al. which creates new url nodes as events are added, and when an event is in the past, the priority level automatically gets adjusted downward.

My question has to do with 404 not found errors if my client decides to delete the event for some reason. I will obviously tell my xml sitemap to remove the url node, but should I be writing to my .htaccess as well with a Redirect gone for those as well since they'll hopefully be indexed with the search engine by then?

I'm hesitant to use a script to do any writing to my .htaccess file since it could screw things up royally if something should go wrong.

Thanks in advance.

+1  A: 

I'm pretty much just following on from what Gumbo said above. The only thing you might want to do is set-up a custom 404 page in your .htaccess so you can forward users to a nicer looking page should they hit it from a search engine; just something along the lines of "Event not found.. but here are some similar events" would be useful to try and get their attention to other areas of your site.

I don't know how your links are set-up but if the link contains SEO keywords you could use those for finding similar events, i.e. if the URL is /events/United_Kingdom/London/100 you could use that information to find similar events in London. If not you could just pull up the latest events or some random ones. You could even modify your delete system to hold onto minimal information of deleted events for the purpose of the 404 page.

You do want to make sure you keep the 404 header so that the search engines won't see all your 'missing' events as duplicate content. If you don't they may penalise your site in the rankings.. no matter how tempting it is to try and fool the search engines into believing this is a genuine page to boost your page count.

Google have published some information on creating useful 404 pages, you might want to check it out.

akiller