While building pages, whenever you create a link, test it to make sure it works.  The following is not a substitute for this, but provide means to test the links exhaustively on a completed page or section, using software tools.  Two options are offered.


The webmaster runs scheduled (monthly or weekly) checks on complete site, using Xenu's Link Sleuth.  See him to add a site to his routine.


The World Wide Web Consortium’s web link checker

Access the link checker here: http://validator.w3.org/checklink.  Fill in the fields as follows:

  • Enter the address (URL) of a document that you would like to check: Provide the complete address of the section’s top English or top French page.
  • Check linked documents recursively: Check this if you are linking to other pages that need to be checked as well.
  • recursion depth: This is the number of levels of links to follow from every page.  Ensure the value is set high enough to cover the level of page nesting in the section, plus to go outside the site to ensure links offsite work.  Do not enter an excessively high number, or you will also be checking the links on offsite pages!

This link checker is a bit slow, and you may want to let it run why doing something else.  But it is very reliable.

Scroll through the output, and note any broken links (they appear in red).  Ignore them if they are from an  off page.  Ignore yellow messages.


Xenu’s Link Sleuth™

This is a third party free link checker that is quite good, and much faster that the W3C's checker.  Unfortunately, it is so fast it times out on many valid links, so it has to be tweeked to work well.  You need to download it and install it on your Windows-based computer.  Get it here: http://home.snafu.de/tilman/xenulink.html and install it on your computer.

The trick to making it work is to set the number of parallel threads very low.  It is set to 30 by default.  Click on options, then preferences. Try a setting of 3 or 4.  The webmaster usually runs checks with the threads set to 10, but sometimes as low as 1.

To run this program, click on File, then Check URL....  Enter the URL (URI) of the highest page you want to check in the top field.

There is a strange bug in Xenu, which sometimes has it checking a few pages on other sites as a result of following links to them.  It should of course check off-site links, but not follow them.  If the checked off-site page has link errors, it reports them.  By sorting the broken link report by the page which has the broken links, all of the pages you are intersted in will be together.  Ignore any messages related to other sites that may come earlier or later in the report.


403 errors

Any bad links identified with error 403 may not be broken.  This error indicates that access is forbidden, and some sites do prevent web crawlers from visiting them.  To be sure, follow the link in the error report to see if it works.

Difficult-to-find broken links

If you get an error message showing CPHA's site's error page, then the page containing the bad link is not shown.  e.g. (for immunize.ca):
http://immunize.ca/diseases-vaccines/influenza/provterrinfluenza.aspx
http://immunize.ca/diseases-vaccines/influenza/%2fcms
%2ferrors.aspx%3faspxerrorpath=%2fdiseases-vaccines
%2finfluenza%2fprovterrinfluenza.aspx
\_____ error code: 400 (no object data)
http://immunize.ca/cms/errors.aspx?aspxerrorpath
=/diseases-vaccines/influenza/provterrinfluenza.aspx
\_____ error code: 404 (not found)
Interpret the "%2f" as "/" and "03f" as "?".  Therefore the message is really:
http://immunize.ca/diseases-vaccines/influenza/provterrinfluenza.aspx
http://immunize.ca/diseases-vaccines/influenza//cms
/errors.aspx?aspxerrorpath=/diseases-vaccines
/influenza/provterrinfluenza.aspx

This error implies that there is a reference to "/diseases-vaccines
/influenza/provterrinfluenza.aspx" in the site, which is an invalid reference.  You need to search a site backup to locate the reference.