checking links

by robert on April 30th, 2009

In order to maintain an up-to-date website it can be useful to know wether links on your pages refer to other existing pages or are rather dead links. For this, linkcheckers can be used. Two prominent examples are the LinkChecker and the W3C link checker. Other link checkers do exist, but lack features such as ignore directives. While the W3C Link checker has a commandline equivalent, it is not as powerful as the LinkChecker. A detailed list of features of LinkChecker can be found here.

An example is the following command

linkchecker --recursion-level=3 --check-html-w3 --output=html > /tmp/linkchecks.html

It will take links into account up to a recursion level of 3, check the syntax of HTML URLs with W3C online validator, and return the output in html format.

Additionally, LinkChecker allows to create different profiles for different sites, easing the adminstration of several projects you have to look after.

From webmaster

1 Comment
  1. KeHoeff permalink

    hey this is a very interesting article!