Someone told me that returning 404 is a bad signal to google which says to them that something is wrong with my site.

What should I return that says to google to remove that url from their index and there is no content for that page?

For example, I have something like url.com?some_arg=1 but if there is no record in the db for the id value 1 then, what should I return?

3 Answers 3


404's are not bad, Google Webmaster Central blog has a great article on this Do 404s hurt my site?


As @Anagio says 404's are not a bad thing, but if you want to let google know that a page is gone return the 410 Gone status instead of a 404.

You can also use Google webmaster tools to remove urls from sites that you own and sites that you don't.

Though you should understand that if an external site is linking to a missing page on your site Google will continue to search your site for it.

Remove the url with webmaster tools first and then return the 410 gone status for the page.

  • google webmaster tools removed this ability since 2016 and after that google suggest to use noindex in meta tag.
    – Ali_Hr
    Commented Jun 13, 2019 at 20:04

Was the URL previously a valid page?

If so, the URL should throw a 301 to a separate URL, only if you have relevant content on the same domain. A lot of SEO folks will tell you to save those indexed pages. This way the engines will simply update their index instead. The more indexed pages you have out the more odds you have being linked to.

HTTP/1.1 301 Moved Permanently
Location: /relatedurl

Was the URL never used?

If so, then yes it's important you're throwing a 404 on ANY page that doesn't represent any content. You never want a dynamic page outputting with no content.


HTTP/1.0 404 Not Found


Status: 404 Not Found    

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.