rilrom

broken link checker

by rilrom
payload-bites
SEO & metadata
v4
>=4.0.0-beta.10 <5.0.0
MIT

Overview

Summary generated from the README

Scans the URLs of configured collections for broken links using Linkinator and stores results in a broken links collection in the admin. You register it in the Payload config and supply resolved URLs per collection, either as a list or an async function. Targets Payload 4 beta, with a separate version line for Payload 3. The plugin is in beta and may introduce breaking changes.

Features

  • Per-collection resolved URLs given as a static list or an async function
  • Helper for resolving URLs from nested docs setups
  • Access control for who can start a link scan
  • Override the broken links collection config
  • Override Linkinator options such as concurrency, timeout, user agent and skipped links
  • Scanning progress indicator and translations

Use cases

  • Find and fix dead links on pages and posts to protect search rankings
  • Give editors a reporting view of broken links grouped in the admin panel
  • Audit a site after a content migration or URL restructure

From the author

broken links are a thing of the past

Installation

npm i @payload-bites/broken-link-checker

115

Stars

7

Forks

2

Open Issues

1 weeks ago

Last Updated

513

Weekly Downloads

v1.0.0-beta.11

npm Version

139.0 KB

Unpacked Size

2

Dependencies

Repository stars

115+3 since Sep 6

Show data
Repository stars by day (UTC)
DateStars
Dec 5, 2026115
Dec 4, 2026115
Dec 3, 2026115
Dec 2, 2026115
Dec 1, 2026115
Nov 30, 2026115
Nov 29, 2026115
Nov 28, 2026115
Nov 27, 2026115
Nov 26, 2026115
Nov 25, 2026114
Nov 24, 2026114
Nov 23, 2026114
Nov 22, 2026114
Nov 21, 2026114
Nov 20, 2026114
Nov 19, 2026114
Nov 18, 2026114
Nov 17, 2026114
Nov 16, 2026114
Nov 15, 2026114
Nov 14, 2026114
Nov 13, 2026114
Nov 12, 2026114
Nov 11, 2026114
Nov 10, 2026114
Nov 9, 2026114
Nov 8, 2026114
Nov 7, 2026114
Nov 6, 2026114
Nov 5, 2026114
Nov 4, 2026114
Nov 3, 2026114
Nov 2, 2026114
Nov 1, 2026114
Oct 31, 2026114
Oct 30, 2026114
Oct 29, 2026114
Oct 28, 2026114
Oct 27, 2026114
Oct 26, 2026114
Oct 25, 2026114
Oct 24, 2026114
Oct 23, 2026114
Oct 22, 2026114
Oct 21, 2026113
Oct 20, 2026113
Oct 19, 2026113
Oct 18, 2026113
Oct 17, 2026113
Oct 16, 2026113
Oct 15, 2026113
Oct 14, 2026113
Oct 13, 2026113
Oct 12, 2026113
Oct 11, 2026113
Oct 10, 2026113
Oct 9, 2026113
Oct 8, 2026113
Oct 7, 2026113
Oct 6, 2026113
Oct 5, 2026113
Oct 4, 2026113
Oct 3, 2026113
Oct 2, 2026113
Oct 1, 2026113
Sep 30, 2026113
Sep 29, 2026113
Sep 28, 2026113
Sep 27, 2026113
Sep 26, 2026113
Sep 25, 2026113
Sep 24, 2026113
Sep 23, 2026113
Sep 22, 2026113
Sep 21, 2026113
Sep 20, 2026113
Sep 19, 2026113
Sep 18, 2026113
Sep 17, 2026113
Sep 16, 2026113
Sep 15, 2026113
Sep 14, 2026113
Sep 13, 2026112
Sep 12, 2026112
Sep 11, 2026112
Sep 10, 2026112
Sep 9, 2026112
Sep 8, 2026112
Sep 7, 2026112
Sep 6, 2026112

Shared by 6 plugins in rilrom/payload-bites.

npm weekly downloads

753+138 since Sep 6

Show data
npm weekly downloads by day (UTC)
DateWeekly downloads
Dec 5, 2026753
Dec 4, 2026799
Dec 3, 2026775
Dec 2, 2026800
Dec 1, 2026989
Nov 30, 20261,141
Nov 29, 20261,047
Nov 28, 2026725
Nov 27, 2026757
Nov 26, 2026825
Nov 25, 2026874
Nov 24, 2026881
Nov 23, 2026785
Nov 22, 2026887
Nov 21, 2026920
Nov 20, 2026871
Nov 19, 20261,172
Nov 18, 20261,167
Nov 17, 2026969
Nov 16, 20261,329
Nov 15, 20261,314
Nov 14, 20261,462
Nov 13, 20261,545
Nov 12, 20261,150
Nov 11, 20261,120
Nov 10, 20261,469
Nov 9, 20261,092
Nov 8, 20261,146
Nov 7, 20261,080
Nov 6, 20261,123
Nov 5, 20261,143
Nov 4, 20261,226
Nov 3, 2026966
Nov 2, 20261,046
Nov 1, 2026928
Oct 31, 2026896
Oct 30, 2026831
Oct 29, 2026767
Oct 28, 2026573
Oct 27, 2026616
Oct 26, 2026525
Oct 25, 2026537
Oct 24, 2026462
Oct 23, 2026335
Oct 22, 2026447
Oct 21, 2026554
Oct 20, 2026487
Oct 19, 2026449
Oct 18, 2026411
Oct 17, 2026457
Oct 16, 2026485
Oct 15, 2026425
Oct 14, 2026378
Oct 13, 2026316
Oct 12, 2026349
Oct 11, 2026321
Oct 10, 2026295
Oct 9, 2026361
Oct 8, 2026433
Oct 7, 2026602
Oct 6, 2026683
Oct 5, 2026733
Oct 4, 2026899
Oct 3, 2026893
Oct 2, 2026860
Oct 1, 2026869
Sep 30, 2026700
Sep 29, 2026607
Sep 28, 2026537
Sep 27, 2026384
Sep 26, 2026370
Sep 25, 2026340
Sep 24, 2026252
Sep 23, 2026285
Sep 22, 2026302
Sep 21, 2026359
Sep 20, 2026383
Sep 19, 2026403
Sep 18, 2026442
Sep 17, 2026482
Sep 16, 2026498
Sep 15, 2026630
Sep 14, 2026638
Sep 13, 2026690
Sep 12, 2026726
Sep 11, 2026746
Sep 10, 2026757
Sep 9, 2026761
Sep 8, 2026698
Sep 7, 2026696
Sep 6, 2026615

Each point is npm's rolling 7-day download count.

Health Score

87/100Excellent

Composite score based on GitHub activity, stars, npm downloads, publish recency, dependency count, and package size.

Badge for your README

Payload Directory health badge
Markdown
[![Payload Directory](https://payloaddirectory.dev/badge/908347705-broken-link-checker.svg)](https://payloaddirectory.dev/plugins/908347705-broken-link-checker)
HTML
<a href="https://payloaddirectory.dev/plugins/908347705-broken-link-checker"><img src="https://payloaddirectory.dev/badge/908347705-broken-link-checker.svg" alt="Payload Directory"></a>
Updated Nov 26, 2026Created Dec 25, 2024Published Nov 26, 2026

README

Broken links are a thing of the past. Protect your SEO by staying on top of your link situation.

[!IMPORTANT] This plugin is in beta and is subject to BREAKING CHANGES. It is not yet recommended to use this in a production environment.

Compatibility table

Payload versionBroken link checker version
v3v1.0.0-beta.x
v4v2.0.0-beta.x

Payload 4 versions are prereleases. Install them with pnpm add @payload-bites/broken-link-checker@beta.

Quick start

  1. Install the plugin:
pnpm add @payload-bites/broken-link-checker
  1. Add the plugin to your payload.config.ts:
import { brokenLinkCheckerPlugin } from "@payload-bites/broken-link-checker";

export default buildConfig({
  plugins: [
    brokenLinkCheckerPlugin({
      collections: {
        pages: {
          resolvedUrls: async (args) => {
            // You do not need to use this function, use whichever approach works for your project needs.
            // This is a utility function I have provided that is compatible with plugin-nested-docs.
            return resolveNestedDocUrls({
              req: args.req,
              collection: "pages",
            });
          },
        },
        posts: {
          resolvedUrls: [
            {
              url: "http://localhost:3000/blog/example-post",
              id: "1",
              collection: "posts",
            },
            {
              url: "http://localhost:3000/blog/another-example",
              id: "2",
              collection: "posts",
            },
          ],
        },
      },
      scanLinksAccess: (args) => args.req.user.role === "admin",
      overrideBrokenLinksCollection: (collection) => ({
        ...collection,
        access: {
          ...collection?.access,
          update: () => true,
          create: () => true,
        },
        admin: {
          ...collection?.admin,
          group: "Reporting",
        },
      }),
      overrideLinkinatorOptions: (defaultOptions) => ({
        ...defaultOptions,
        concurrency: 50,
        timeout: 5000,
        userAgent: "Custom User Agent",
        linksToSkip: [...defaultOptions.linksToSkip, "http://localhost:3000/blog/example-post"],
      }),
    }),
  ],
});

Defaults

For defaults, refer to defaults.ts.

Options

For options, refer to types.ts.

Roadmap

  • Inline editing and unlinking of broken links.
  • Scanning progress indicator.
  • Scheduled scanning.
  • Multitenancy.
  • Custom broken links collection config.
  • Custom linkinator config.
  • Documentation.
  • Translations.

Similar plugins