cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Go to solution

404.shtml page returning 200 http code

Google Webmasters is reporting http://www.costumingdiary.com/404.shtml as a soft 404 page.

The page (or any error page) is returning a 200 response.
(Test by entering http://www.costumingdiary.com/error.html OR http://www.costumingdiary.com/404.shtml at this website: https://httpstatus.io/

 

How do I get the 404.shtml page, and any error page, to return a proper 404 code?

 

Thanks.

1 ACCEPTED SOLUTION

Accepted Solutions
Solution

Re: 404.shtml page returning 200 http code

You'll need to configure Error Pages in your web server (Apache) so it sends a 404 when it cannot find a page.  In cPanel you will find this setting under Manage Hosting > Advanced > Error Pages.  Copy and paste the html from your current 404/error.shtml pages into the Error Page of this section and it will return it with a 404 when it cannot find a page. 

 

I'm assuming you've created the current pages (error.shtml and 404.shtml) just as you would any other page. The confusion occurs when Apache receives a request for those pages, it searches your web folder and finds the page successfully, hence the 200 response code when it serves the page to the visitor. 

View solution in original post

3 REPLIES 3
Solution

Re: 404.shtml page returning 200 http code

You'll need to configure Error Pages in your web server (Apache) so it sends a 404 when it cannot find a page.  In cPanel you will find this setting under Manage Hosting > Advanced > Error Pages.  Copy and paste the html from your current 404/error.shtml pages into the Error Page of this section and it will return it with a 404 when it cannot find a page. 

 

I'm assuming you've created the current pages (error.shtml and 404.shtml) just as you would any other page. The confusion occurs when Apache receives a request for those pages, it searches your web folder and finds the page successfully, hence the 200 response code when it serves the page to the visitor. 

View solution in original post

Re: 404.shtml page returning 200 http code

That was it. Thank you!

HTTP: 200 error

I have a problem with the HTTP: 200 code, it say that I have to report this error with my current hosting, but I don´t know where I can do that

31490748_797134847145302_5977252187082850304_n.png