Home › Forums › Legacy Support › Support queries › Other issues › 404 page returns status 200
- This topic has 15 replies, 4 voices, and was last updated 8 years, 7 months ago by Anshuman Sahu.
-
AuthorPosts
-
March 1, 2016 at 11:08 am #33119kosirParticipantHello! 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.March 2, 2016 at 7:20 am #33259Anshuman SahuKeymasterYou observation seems to be valid .We will fix this in the next update of wplms theme releasing today .March 2, 2016 at 11:22 am #33339kosirParticipantThanks 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 :DMarch 3, 2016 at 8:06 am #33499H.K. LatiyanParticipantThanx for sharing the information with us.March 3, 2016 at 7:14 pm #33724kosirParticipantnp. I'll set this to resolved since this is in testing alredy (https://trello.com/c/O3qQ3n4b/377-404-return-200-status-in-indexing).March 3, 2016 at 10:51 pm #33740kosirParticipantI 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)
March 4, 2016 at 5:37 am #33801H.K. LatiyanParticipantThis 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.March 4, 2016 at 9:32 am #33956kosirParticipantNope. Updating permalinks did not help and all my plugins are updated. Error still the same.March 4, 2016 at 11:01 am #33990kosirParticipantFixed 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?March 5, 2016 at 11:10 am #34289Anshuman SahuKeymasterThis 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 .March 6, 2016 at 6:07 pm #34496kosirParticipantTry fix I used (new page template). It works like it should and user only have to set page template once.March 7, 2016 at 2:42 pm #34725Anshuman SahuKeymasterThis is a known issue and will be fixed in the next update of wplms theme .April 11, 2016 at 12:06 am #42209punkandchoopParticipantHi 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.April 11, 2016 at 2:38 pm #42412Anshuman SahuKeymasterYep this will be fixed in the theme update for sure .April 11, 2016 at 7:12 pm #42442punkandchoopParticipantHi Alex -- Do you mean in the next theme update? And when do you expect that to be? -
AuthorPosts
- The topic ‘404 page returns status 200’ is closed to new replies.