The first step for the budding webmaster is to register your site at Google Webmaster Tools. That will give you a window into how Google sees your site. I like to check once a week to make sure that the Googlebot can find everything that it is looking for.
The next step is to learn how to interpret your web server log files. Your mileage may vary, but here’s how I look for 404 errors:
$ zgrep -w 404 access_log.20080512.gz | cut -d ' ' -f7,11 | uniq -c
"zgrep -w 404" retrieves lines with the word 404 from my compressed access logs
Here we see some failing radio userland links and a mis-behaving client that is adding a trailing ‘/‘ to my page links. A little htaccess magic and the 404’s are cured.