Check for broken links with the W3C Link Checker
As anyone who has ever managed a website before can tell you, checking for broken links can be a major task. This is especially true for larger sites, older sites or websites with multiple content editors. Even if you make sure all the internal links on your own website are accurate, any external links that were once valid may “break” over time through a process known as “link rot” in which content on external websites is deleted or moved without a proper redirect.
A few months ago, I wrote a Python script to check for broken links across an entire website and produce a spreadsheet with any 404 links it found. As useful as the tool can be, I know it won’t be easy or quick for everyone, since it requires installing Python and running the script from the command line on your machine.
For something quick - or easier for non-developers - I recommend using the W3C Link Checker tool to check for broken links. The link checker is available online and runs easily in the browser, so there’s no need to download or configure anything special. The downside to the W3C Link Checker is that it only checks one web page at a time; you have to manually type (or copy-paste) the URL you want to check.
The W3C Link Checker can be fun to use. After entering a URL and clicking “Check”, you can watch it operate in real-time as it scans the web page and produces results. Ideally, you’ll hope to see all the links on your page return a 200 OK status code. If the link checker finds any 404 links, you’ll want to fix those as soon as you can.
Another benefit of this tool is that it will also provide additional warnings and recommendations you may want to consider. For example, the link checker advised me to make some small edits to the links on this website’s home page in order to speed up browsing. For example:
Line: 77 https://kjbritt.github.io/oceans redirected to https://kjbritt.github.io/oceans/ Status: 301 -> 200 OK The link is missing a trailing slash, and caused a redirect. Adding the trailing slash would speed up browsing.