Checking for Broken Links - HTML

Broken links are one of the major banes of Web sites. When you move pages or redesign your site, there is always a chance that you will break a link to another page. The various ways a link can be broken include the following:

  • A page can be orphaned, the links to the page disappearing from referring page(s).
  • A referring link can be mistyped or otherwise wrong.
  • A page that is referred to might not make it to the server.
  • A page external to your site might move or completely disappear.

Thankfully, broken links are a common problem and you have several tools at your disposal to help avoid them.

The W3C Link Checker
The World Wide Web Consortium maintains an online link checker.
To use the W3C Link Checker on your site, follow these steps:

  1. Put the URL to your home page in the main text box.
  2. Choose the options for checking your site.
    • Use the Summaryonly option if you don’t want details.
    • Use the Hide redirects option if you don’t want to see redirect reports.
      You can choose to eliminate all redirect reports or only those for directories.
      The W3C Link Checker.

      The W3C Link Checker.

    • Use the Accept-Language headers option to control whether the Accept-Language headers are used during checking.
    • To check several layers of your site, set the recursion depth option accordingly. Check the check box and enter the recursion depth in the associated text box.
    • You can check the Save options box if you want the tool to save your settings in a cookie for later use.
  3. Click the Check button to begin checking your site. The tool will display its progress as it checks your site.

The online W3C Link Checker in action.

The online W3C Link Checker in action.

Checkers built into development tools
Many Web development tools have integrated link checkers that you can use while you develop your site. For example, Macromedia Dreamweaver includes a comprehensive checking feature.Check the documentation on your favorite tool to see if it has a comparable feature.

Local tools
There are several tools you can download and run locally to check links on your site. Visit your favorite software repository site to search for a suitable tool for your use.

Macromedia Dreamweaver has a link checker feature built in so you can check your links as you develop your site.

Macromedia Dreamweaver has a link checker feature built in so you can check your links as you develop your site.

Watching your logs
Your server’s log files can also alert you to broken links. For example, the Status Code Report lists several Document not found (404) errors. These errors can be caused by broken links on your site or sites that refer to your site. By enabling more reporting details, you can usually find out what referring document had the broken link.

All rights reserved © 2020 Wisdom IT Services India Pvt. Ltd Protection Status

HTML Topics