Forum Homepage › Forums › Community › General › 404 header
This topic contains 8 replies, has 3 voices, and was last updated by
Marshall Sorenson 11 months, 3 weeks ago.
-
AuthorPosts
-
June 27, 2012 at 3:30 pm #1321
Hi,
I think 404 page need to haveheader('HTTP/1.0 404 Not Found');
it gives 200 response atmJune 28, 2012 at 1:02 pm #1331I’ve never heard about this before.. Do other WordPress theme add this to the header with conditionals? Could you point me to a resource where this is expected of a WP Theme? I’m happy to implement it if it’s required
July 1, 2012 at 10:23 am #1350An example info about topic:
http://www.seomoz.org/learn-seo/http-status-codes
If a visitor/spider reach a 404 page.. that page need to be 404 status.. not 200
July 1, 2012 at 2:47 pm #1354Yeah but you do you achieve that? I’ve never seen a WordPress theme do this.. Not even the official WordPress themes (twentyten/twentyeleven/_S). I tried to find a code example or technique on how to do this but came up empty.
July 1, 2012 at 3:31 pm #1356i just replaced this:
<code>infinity_get_header(); </code>
with this:
<code>header('HTTP/1.0 404 Not Found'); infinity_get_header(); </code>An example 404:
http://gapvitrin.com/404example
You can check headers from
http://www.webconfs.com/http-header-check.php
Dunno why wp themes not gives 404 status code on 404 pages.. but its necessary imo.
For example:
http://www.google.com/404example
returns: HTTP/1.0 404 Not Found
http://www.w3.org/404example
returns: HTTP/1.1 404 Not FoundJuly 1, 2012 at 4:11 pm #1357Funny think is.. WordPress websites gives 404 too:
http://en.wordpress.com/404example
returns: HTTP/1.1 404 Not Foundhttp://wordpress.org/404example
returns: HTTP/1.1 404 Not FoundFor example Matt’s own website:
returns: HTTP/1.0 404 Not Found
July 2, 2012 at 2:39 pm #1363A WordPress 404 page explanation:
http://yoast.com/404-error-pages-wordpress/
> 404 is not only the name, it’s also the HTTP header that the page
> should send, if not, you might end up with 404 pages in the search
> engines indexes. You can easily check this with a HTTP header checker.July 3, 2012 at 2:18 am #1364oh well..
It seems its not Infinity’s fault. I was getting 200 response @ 404 pages but it seems its about modifying the main wp_query:https://twitter.com/Otto42/status/219884490556841985
I did a fresh wp install and tried infinity.. it gives successfully 404 error. I will still add
header('HTTP/1.0 404 Not Found');to 404.php for safety because i will modify main wp_query always.July 4, 2012 at 12:34 am #1374Please open a feature request issue on GitHub and I will add support for this in core or with an extension.
-
AuthorPosts
You must be logged in to reply to this topic.