On the 404 page, look for an XML file and read it in. If it doesn't exist, display 404 message
Drupal let you specify custom 403 and 404 error pages:

admin-&gt;settings-&gt;error-reporting


Your custom error page may be PHP, so you can place any logic in it you want, including the one you suggest.

Edit: As already stated by develkar, if you do not want this indexed by Google or other search engines, you disallow it in you robots.txt.