Use the Content Toolkit

Use the Link Checker

📌 Requirements: Pressbooks Enterprise network with the Content Toolkit enabled. This tool is not available on Pressbooks Self-Publisher (pressbooks.pub).

The Link Checker allows you to easily locate all broken or unreachable links within your book, so that you can know exactly which links to fix to ensure a smooth experience for your readers.

Check Links

If your network has the Content Toolkit enabled and you have the user role of Administrator in a book, you’ll see an option in the left sidebar of your book dashboard, Content Toolkit > Link Checker. Navigating there will bring you to an interface where you can request a new scan or view the results of the most recent scan for broken links in your book.

To run a scan, click the Start Scan button. The tool will then comb through your book, systematically checking every link. While the scan is running, you can leave the page and return later. You can also opt to receive an email when the scan has completed.

Understand the Report

Once the scan completes, a report will appear on the Link Checker page. You can view the report here or click the Download Report (CSV) button to download the report as a CSV file.

By default, the report in the interface displays links that appeared to be Broken during the scan. However, it is possible to view different categories from the interface:

Screenshot of the different, available display options: showing All links, showing only Broken links, showing only links with Warnings, or showing only Dismissed links.

  • All displays the entire list of checked links, including working links with the Status of 200 OK.
  • Warnings only displays links that may or may not be reachable (specifically, where the connection timed out while the link was being checked).
  • Dismissed only displays links that have been dismissed as false positives from the report – more on this below.

Additionally, results can be sorted using the filters available in the interface:

Screenshot showing the different filter options: filtering by Chapter, Visibility, or Status.

You can limit results to specific chapters in the Chapter dropdown menu; to Public or Private chapters from the Visibility dropdown menu; and to kinds of flagged issues from the Status dropdown menu, pressing Filter to update the returned results.

For each listed link:

  • The Link column shows the link itself.
  • The Link Text column shows the text, in your book, that points to the broken link.
  • The Chapter column shows the book chapter, front or back matter where the broken link was found. You can click the page title to navigate directly to the editor for that page.
  • The Visibility column shows the whether the book chapter, front or back matter where the broken link was found is Public (“Show in Web” selected) or Private.
  • The Status column shows the HTTP status code that was returned when the link checker attempted to navigate to the link.

Common status codes:

  • 401 Unauthorized: the resource you’ve linked to requires login or authentication in order to be viewed.
  • 403 Forbidden: the web server hosting the linked resource is forbidding access (a permissions issue).
  • 404 Not Found: the page doesn’t exist at the given address.

Dismiss Links

Although Pressbooks developers aim to reduce false positives to a minimum, you might find that certain links return an error in your report without, in fact, being broken. (For example, a linked page with a login option might return a 401 Unauthorized error despite the relevant content being viewable without logging in.)

You can dismiss such links from your report, moving them from the Broken or Warnings views into the Dismissed view. There are two ways to dismiss a link:

  1. Hover over the link in the Link column. The word Dismiss will appear; clicking Dismiss moves the link into the Dismissed view.
  2. Check the box to the left of the Link column for each link that you want to dismiss. In the Bulk Actions dropdown menu, select Dismiss and click the Apply button to dismiss all selected links.

It is also possible to Undismiss a link with either of the above approaches, returning the link to the Broken or Warnings view.

If you run a new scan, dismissed links remain dismissed and are not counted in the total number of issues found during the scan.

Unlink Links

It’s possible to remove broken links from your book directly from the Link Checker page. This is done through “unlinking,” which leaves the linked text in place, but removes the link that the text previously pointed to.

Unlinking can be done in two different ways:

  1. Hover over the link in the Link column. The word Unlink will appear; click Unlink.
  2. A confirmation dialog will appear informing you that all instances of the link will be removed throughout the book.
  3. Click Unlink.

Alternatively, you can unlink links via Bulk Actions:

  1. Select the checkbox to the left of each link that you want to remove.
  2. From the Bulk Actions dropdown menu, select Unlink.
  3. Click the Apply button.
  4. A confirmation dialog will appear informing you that all instances of the selected link(s) will be removed throughout the book.
  5. Click Unlink.

⚠️ If the broken link you’re removing is the image source for an image in a chapter, the Unlink action removes the image from the chapter.

Changes made via the Unlink action are tracked in the revision history for each chapter.

Recheck Links

It’s possible to recheck the current status of any link in the report (for example, if you believe the site that a flagged-as-broken link pointed to may be back online). To do so, hover over the link in the Link column. The word Recheck will appear; click Recheck.

Alternatively, you can recheck multiple selected links via Bulk Actions:

  1. Select the checkbox to the left of each link that you want to recheck.
  2. From the Bulk Actions dropdown menu, select Recheck.
  3. Click the Apply button.

License

Icon for the Creative Commons Attribution 4.0 International License

Pressbooks User Guide Copyright © 2024 by Pressbooks is licensed under a Creative Commons Attribution 4.0 International License, except where otherwise noted.

Share This Book