Skip to content
Physics and Astronomy
Home School documents Web pages Link checking
Back to top

Link checking

As of May 2009 we are running an experimental link check in the early hours of each morning. To enable it you must create a world-readable file called linkcheck.txt in the directory you wish to be checked. For a sensibly indexed directory a single linkcheck.txt file will link-check that directory and all of its sub-directories.

linkcheck.txt has the usual sidebar-like syntax in that options consists of a word followed by a colon, everything else is taken to be a URL to be excluded from the check.

Example minimal linkcheck.txt file

mailto: a.n.other@exeter

# URLs not to check
http://www.example.com/dontcheckthis.html
http://www.example.org/orthis/
Details of any broken links will be emailed to a.n.other@exeter (assumed to be you!). If there are no broken links no email is sent. You must specify an email address for the check to run.

Other options

depth: n
# Only check links to depth n with respect to this directory.
# (I believe this refers to the number of links a page is
# away from the original, not the directory depth.)

fragments:
# For links of the form:
# http://www.example.org/page.html#fragment
# check that "fragment" exists (should this be the default?)

sunday:
monday:
tuesday:
wednesday:
thursday:
friday:
saturday:
# Only run on the morning(s) specified.

verbose: n
# Verbosity: by default the link-checker runs in quiet mode
# (no error, no email), if n is omitted or zero, it runs
# in standard mode, otherwise runs in verbose mode.

disable:
# Disables the link check

When you first create the file I would advise deliberately creating a broken link in one of your web pages just to check it is behaving as you would expect.

Acknowledgments

The link checker is a slightly modified version of the publicly available W3C linker checker.
                                                                                                                                                                                                                                                                       

Validate   Link-check © Copyright & disclaimer Privacy & cookies Share
Back to top