• I deleted a page. But if someone clicks the link via a search engine, they still come to my site and get a “Sorry, no posts matched your criteria.” I found I get this message for any not existing page ie: https://www.domain.com/doesnotexists.html.
    I am using permalinks, and the .htaccess file is set to:
    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>

    # END WordPress

    I know how to trap 404s. But I want to actually send a 404 if someone requests a specific page that I deleted. I want to make sure the search engines remove it from their indexes ASAP.

    Thanks,
    RJ

  • The topic ‘How to force a 404 error status?’ is closed to new replies.