In addition, you must set the http status when rendering the template:
rescue_from ActiveRecord::RecordNotFound do render :not_found, :status => :not_found end
The Rails guide (section 2.2.13.4) opens for a list of states.
As indicated elsewhere (for example here ), you should never redirect when sending 40x status, only 30x statuses should allow redirection. Thus, you may come across a strange page "You are being redirected" when trying to redirect with: not_found status.
source share