Making 404 work properly


#1

I am using Meteor 1.6 and Prerender.io.

AT the moment - all URLs at my domain get a 200 http response, no matter if a page was found or not.

This is terrible for SEO - and lots of people who are trying URLs (possibly hack attempts) on the system are getting 200 responses and Google is even indexing them as working responsive pages - although the screen shows Not Found !!.

Is there any way to deal with this 404 issue.

I am using the connectHandlers - but not having much luck making all routes work as 200 only when a parameter is found in the database.

If the search is not found in the DB i should be able to return a 404 !!!


#2

You can use Robots.txt file. The pages which are not working still gets 200 https response, make the list and include in Robots.txt file.


#3

Not sure if i fully understand your method.

I am not just looking for a crawler 404 - I would like to return HTTP 404 - even to browsers if they visit a link directly that is not there