404 header should be optional

  1. hardjoko

    With plugin we can customize our 404 pages so it gives real content.

    But wordpress still pops 404 header if we go to http://domainname.com/whatever

    Only programmers and bots see it though while real visitors do not. But it still cause problems.

    Here is what live http header says.

    GET /whatever HTTP/1.1
    Host: domainname.com
    User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.Cool Gecko/2009032609 gecko mozilla
    Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
    Accept-Language: en-us,en;q=0.5
    Accept-Encoding: gzip,deflate
    Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
    Keep-Alive: 300
    Connection: keep-alive
    Cookie: wp-settings-time-1=1239173748
    If-Modified-Since: Sat, 11 Apr 2009 16:02:33 GMT
    Cache-Control: max-age=0

    HTTP/1.x 404 Not Found
    Date: Sat, 11 Apr 2009 16:02:41 GMT
    X-Powered-By: PHP/5.2.8
    X-Pingback: http://domainname.com/xmlrpc.php
    Expires: Wed, 11 Jan 1984 05:00:00 GMT
    Cache-Control: no-cache, must-revalidate, max-age=0
    Pragma: no-cache
    Last-Modified: Sat, 11 Apr 2009 16:02:42 GMT
    Content-Type: text/html; charset=UTF-8
    X-Cache: MISS from squid.cw
    X-Cache-Lookup: MISS from squid.cw:65532
    Connection: close

    Why the hell WordPress need to pop a 404 header when no page is found? Why not pop a 200 and let the template decide what to put? Something like http://wordpress.org/extend/plugins/smart-404/ to take care of it.

    The only way I know to prevent wordpress to disable 404 is to well, go the code where it pops 404 and comment that out. Of course, every update will nullify that.

    Think it this way. Some guys buy expired domain and use it for wordpress.

    Say it's domainname.com/foo

    Then, it becomes a wordpress blog. domainname.com/foo no longer exist.

    Visitors come. That's okay, we have 404 pages. No problem. But when search engine comes, it sees the 404 header.

    Also adsense do not allow us to put pages in 404. Webmaster may think that their 404 pages is not a 404 pages at all but filled with real content. But google bot see the 404 header being thrown out and think that the publisher must be cheating.

    Posted: 9 years ago #
  2. Please check plugin Link Juice Keeper. It redirects all 404 pages to front page using 301 redirect.

    Posted: 9 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.

  • Rating

    0 Votes
  • Status

    This is plugin territory