Check Your Logfiles
Most server logs will include the referring document for a page, i.e. the page that the user was at prior to the current page. You can use this information to track down broken links, either on or off your site. If you see that an entry in your server log has a status of 404, find out what the referring page was. Either correct the link on your site, or write to the webmaster of the site with the link (search engines have forms for submitting broken links).
If your logfiles don’t include the referring page or you don’t have access to them, there are a few things you can try:
– Ask your ISP to give you access to your logfiles, or ask them to use a format which includes the referring page.
– There are simple ways to write your own logfiles to track the referrer using something like ASP or PHP and writing to a database or text file.