Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

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?

share|improve this question
add comment

3 Answers

up vote 8 down vote accepted

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

share|improve this answer
add comment

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.

share|improve this answer
add comment

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.

Apache:

HTTP/1.0 404 Not Found

FastCGI:

Status: 404 Not Found    
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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