Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I keep Google from indexing my custom 404 error page?

Tags:

asp.net

I use ASP.Net and I have a custom 404 page. When user pastes url that is not found it will redirected to the custom 404 page. However google indexes my custom 404 page. Search 404(page not found).

Anyone have solution?


1 Answers

You can make your errors directory or each file off-limits to google by adding it to your robots.txt file in the root of your site. This actually applies to any directories/files that you don't want google to index.

More information on robots.txt can be found at http://en.wikipedia.org/wiki/Robots.txt or http://www.robotstxt.org/.

like image 81
tvanfosson Avatar answered Jan 22 '26 21:01

tvanfosson