Home Forums Etch 404 page creates a soft 404 error through google search engine

This topic contains 2 replies, has 2 voices, and was last updated by  eadcock 4 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #46299

    eadcock
    Participant

    Hello Josh,

    I’m getting a lot of “Soft 404″ errors through our google search console and I was wondering it you knew whether the HTTP status of the 404.php page is 200, 404 or 410. If it’s a 200, I’d like to customize this to be an actual 404 page. I was thinking that I could create a custom header that still has the navigation and look and feel of the current 404 by creating a 404 version of the current header file that only changes the HTTP status. Which header file would I edit – the header.php pr head.php files?

    #46307

    Joshua
    Keymaster

    The default status of the 404.php page is set by WordPress as 404. The theme does not change the status code.

    If you’d like to manually change a header response, you probably don’t want to do it inside the template as a response has already been sent. Instead, WordPress offers a status_header() hook you can add a filter too.

    However, if you’re getting this response on your actual 404 pages (and not trying to manually set this up for a different page like a search query with no results or custom page), then your issue may lay in your server configuration. For example, if your problem is in your htaccess file, you may not be able to modify any response given by WordPress.

    #46333

    eadcock
    Participant

    Thank you Joshua,

    I’m sure it’s an htaccess issue now that you mention it. Some of the plugins are altering that file, so I’m sure that’s causing the issue.

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.