How to send 404 header using asp

I am programming a custom 500 error page that I would like to look like a 404 to googlebot in certain cases.  What is the method for manually setting the status sent to the browser to be 404?  I know there is a simple way to do it in PHP, but I have never seen it done in classic ASP.
Who is Participating?
basicinstinctConnect With a Mentor Commented:
does this work?

<% Response.Status = "404 Not Found" %>
You may even want to club 200 OK with what @basicinstinct has suggested as some websites report a "not found" error by returning a standard web page with a "200 OK" response code; this is called a soft 404

Response.Status = "200 OK"
<!--The rest of your script-->
nbraaschAuthor Commented:
I don't want to send the 200, since googlebot is requesting a *REALLY* messed up URL which I don't want it to ever try to request again - hence me catching it at the server 500 error level.  I will test with 404 and let this question know what the results are.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.