AI OnAI Off
There's no need to install the Geta handler if you just want 404 pages and not CMS controlled redirects.
Turn custom errors off
<customErrors mode="Off" />
Configure HTTP Errors pointing at a CMS path
<system.webServer>
<httpErrors errorMode="Custom" existingResponse="Replace">
<remove statusCode="404" />
<error statusCode="404" responseMode="ExecuteURL" path="/NotFound" />
</httpErrors>
</system.webServer>
Setup a controller for the error page that returns a 404 response in the controller action
Response.StatusCode = 404;
How to setup 404-error page in episerver cms