According to woorank.com seo tools, I read that its not best practice for a website to not have a custom 404 error page. But here's why I don't have it on a domain.Currently I and one other person manages the contents of the domain, which includes generating and removing URLs automatically.For example, Say the site is about food and the other person decides to add fruit to the site. Then a page is automatically generated and this URL is then created and accessible:http://example.com/fruitThen he adds apples and oranges. These URLs are then created:http://example.com/fruit/appleshttp://example.com/fruit/orangesThen he adds vegetables. These URLs are then created:http://example.com/vegetablesThen he adds carrots and celery. These URLs are then created:http://example.com/vegetables/carrotshttp://example.com/vegetables/celeryTherefore these URLs in total will exist:http://example.comhttp://example.com/fruithttp://example.com/fruit/appleshttp://example.com/fruit/orangeshttp://example.com/vegetableshttp://example.com/vegetables/carrotshttp://example.com/vegetables/celeryLater on, he decides to no longer have carrots or oranges. This means the accessible URLs are now:http://example.comhttp://example.com/fruithttp://example.com/fruit/appleshttp://example.com/vegetableshttp://example.com/vegetables/celeryand these ones should return status 410:http://example.com/fruit/orangeshttp://example.com/vegetables/carrotsand in an ideal sense, the rest of the URLs not listed should return 404 status.When he decides to remove a food category or a food item, it will likely never be added again in the future.The only way I feel I can pull this off properly is to configure mod_rewrite to return status 404 by default to URLs not listed, and the ones that recently are removed should be stored in a database so that it is checked before returning back a 404.My line in .htaccess would look like this:RewriteRule ^(.*)/(.*)$ /loadpage.php?foodcategory=$1&food=$2 [L]RewriteCond %{REQUEST_FILENAME} !-fRewriteCond %{REQUEST_FILENAME} !-dRewriteRule ^$ /homepage.php [L]RewriteCond %{REQUEST_FILENAME} !-fRewriteCond %{REQUEST_FILENAME} !-dRewriteRule ^(.*)$ - [R=404,L]My question then is this...Is it okay (standard wise) to give a page with http 410 status code for an entire domain for URLs that don't exist on it or must I give an http 404 status code for URLs that never existed before on the domain and flood my database with old URLs that are removed and give http 410 status to them?
Can a website meet standards without a single link returning 404 status?
404;http;standards;code;410 gone
A 404 or 410 is fine for any page or URL that does not exist. You do not have to mix the two- you can chose just one.If the page is gone, then a 410 is certainly appropriate, however, a 404 is automatic (as well as traditional as a result) and fine too. Just know that Google, for example, will try for a number of times before delisting any URL from the index. In the meantime, it will be dropped from the SERPs for anything that does not appear to be temporary- that is, 404ed several times consistently. Google will sometimes sample a page more frequently when a 404 is issued or in the case of several 404ed pages, sample a wider set to ensure that there is not a wholesale site change that it should be aware of.I would say which ever is easiest. If you can 410 all non-existent URLs, then that would be great- otherwise go for a 404 which should be easier but require more failed attempts overall for the same effect.