aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes Custom 404 error pages and webcrawler results Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Custom 404 error pages and webcrawler results" Watch "Custom 404 error pages and webcrawler results" New topic
Author

Custom 404 error pages and webcrawler results

Rob Hunter
Ranch Hand

Joined: Apr 09, 2002
Posts: 818
I'm not sure if this is the best place to post but here goes.
I have a custom 404 page set-up on my server and, upon an unsuccessful search, I manage to get that 404 page. Is there a way to tell web crawlers that this page is really a 404 error page (i.e. return status 404 to it)?
Rob Crowther
author
Ranch Hand

Joined: Nov 06, 2012
Posts: 295
    
    5

Yes, set the response Status-Code to 404. If your 404 page isn't returning this status already it's not really a 404 page. Have you checked what status code your 404 page is returning?


Read my books: Hello! HTML5 & CSS3 | HTML5 in Action | Read my blog
Rob Hunter
Ranch Hand

Joined: Apr 09, 2002
Posts: 818
Setting a custom 404 page on the server. Had to set the 404 link to be a File (not URL) first off. When checking what the status code was from the custom 404 page it was giving a 200 status code. Some more tinkering got it working.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Custom 404 error pages and webcrawler results