Have you ever bookmarked a page because it is useful to you but later on, due to software maintenance, the URL is moved, and you have to contact the site administrator to provide you with a new URL? If I was the site administrator, I will probably craw my site for all URLs and put these into a database table, and implement the 404 handler to check this table. If the URL exist in this table but is no longer found, it should email me so that I can update this table with the new URL. The table structure for this probably look contains: id, url, replacement_url, doNotNotifyMe. Malicious users can throw a lot of invalid request at my site, (we should have other DDoS protection in place), but nonetheless, this 404 handler should be fast, and the table probably should be a file on the system or on a separate database server.