404 page returns status 200

Home Forums Legacy Support Support queries Other issues 404 page returns status 200

Tagged: ,

Viewing 15 posts - 1 through 15 (of 16 total)
  • Author
    Posts
  • #33119
    kosir
    Participant
    Hello! I found a problem, which I think is critical, but is unforgettably common in most wp themes. The 404 page returns status 200 and not 404, so search engines thinks it's just another page on your site and not a 404 error. I did set my 404 error page in WPLMS settings. I added noindex for 404 page but that is not the best solution. Attached is a screen shot of status codes for my and googles 404 page. This is also a problem when using some tool to check your broken links (example Broken links checker for wp). The spider will not see broken links so it's report will be false. Here is what Google and Bing are saying about this: Google You should still make sure that your webserver returns a 404 status code to users and spiders, so that search engines don't accidentally index your custom 404 page. (https://support.google.com/webmasters/answer/93641?hl=en) Bing From an SEO perspective, a 404 page should return a 404 Status Code (Page Not Found) as opposed to a 200 (OK) status code. The return of a 404 Status Code is used to alert automated users such as search engine crawlers that the link is in fact broken, and is the only way an automated user can ascertain this. If 404 pages return a 200 Status Code then Search Engines consider this broken link still valid, and the “404 page” could end up in the index. (https://www.bing.com/webmaster/help/404-pages-best-practices-1c9f53b3). Could you please help me find a solution for this.
    #33259
    Anshuman Sahu
    Keymaster
    You observation seems to be valid .We will fix this in the next update of wplms theme releasing today .
    #33339
    kosir
    Participant
    Thanks for quick response. Fix to this problem is very simple. I just created a new page template like this: I made a copy of page.php and renamed it to page-404.php. I added code below right after <?php /** * Template Name: 404 Page */ header("HTTP/1.0 404 Not Found"); Now just edit the custom 404  page and select 404 Page as a template. Result is a custom 404 page that return status code 404 (see attachment) and a working broken links checker :D  
    #33499
    H.K. Latiyan
    Participant
    Thanx for sharing the information with us.
    #33724
    kosir
    Participant
    np. I'll set this to resolved since this is in testing alredy (https://trello.com/c/O3qQ3n4b/377-404-return-200-status-in-indexing).
    #33740
    kosir
    Participant
    I upgraded to 2.0.6.1 but the problem is now even worse. For example:
    • http://zelenahisa.si/fghjk returns blank page
    • http://zelenahisa.si/katalog/fghjk returns a page not found that does send a 404 status code (katalog is where all my courses are) but the content of the page is not from page I selected as a 404 page but main page of one of my courses.
    • http://zelenahisa.si/e-izobrazevanje/sdfgg returns a blank page (this is a normal wp page)
    What am I doing wrong?
    #33801
    H.K. Latiyan
    Participant
    This happens due to permalinks. Its always recommended to resave the permalinks and clear browser cache after updating. Also make sure all your plugins and the theme should be updated to latest version.
    #33956
    kosir
    Participant
    Nope. Updating permalinks did not help and all my plugins are updated. Error still the same.
    #33990
    kosir
    Participant
    Fixed this on my own. Now the only page that returns wrong 404 page is everything under courses directory (zelenahisa.si/katalog/*) which still shows content from one of my courses and not 404 page. What else besides 404.php did change for this?
    #34289
    Anshuman Sahu
    Keymaster
    This is an issue in the wplms .We tried to fix this but it now returning blank page rather than returning 404 page which is set in wplms options . This will be fixed in the next theme update of wplms .
    #34496
    kosir
    Participant
    Try fix I used (new page template). It works like it should and user only have to set page template once.
    #34725
    Anshuman Sahu
    Keymaster
    This is a known issue and will be fixed in the next update of wplms theme .
    #42209
    punkandchoop
    Participant
    Hi Alex -- It appears that this was not fixed with 2.0.8.  Can you please confirm that a fix is coming? Hi kosir -- Thanks for providing that temporary fix.
    #42412
    Anshuman Sahu
    Keymaster
    Yep this will be fixed in the theme update for sure .
    #42442
    punkandchoop
    Participant
    Hi Alex -- Do you mean in the next theme update?  And when do you expect that to be?
Viewing 15 posts - 1 through 15 (of 16 total)
  • The topic ‘404 page returns status 200’ is closed to new replies.