Rotproof

Check a Docusaurus site for broken links

Rotproof checks every link on a website on a schedule and emails you when one breaks. This page is about using it on a site built with Docusaurus: what Docusaurus already checks for you, what it leaves out, and what to set up first.

Check your site's first 25 pages free. No account, and nothing is emailed.

What Docusaurus checks itself

When you build the site, Docusaurus checks the links between your own pages. A link to a page that doesn't exist stops the build: that's the onBrokenLinks setting, which throws by default.

Since version 3.1 it also warns about a link to a heading that doesn't exist, with onBrokenAnchors.

What that leaves out

Docusaurus doesn't request links to other websites, so a link to someone else's page is never checked.

The larger gap is time. A build checks your links on the day you build. A page you linked to last year can be deleted, moved or sold next month, and nothing in your own repository changes when it does. Nobody finds out until a reader does.

How Rotproof reads a Docusaurus site

Docusaurus renders every page to HTML when it builds, so your links are in the HTML your server sends and Rotproof can read them, the free check included.

The classic preset includes the sitemap plugin, so a production build has a sitemap.xml, and Rotproof finds your pages from it. If you've removed that plugin, add it back first.

The free check reads your home page and up to 24 more pages from your sitemap, and checks up to 300 links on them.

What it checks, and how

From one check to a schedule

The free check is a single look at 25 pages. With a free account, Rotproof checks up to 500 pages every week and emails you when a link breaks or starts working again. Paid plans check daily.

Checking on a schedule needs proof that the site is yours. That's one DNS record, added wherever you manage your domain. If you can't add DNS records, as on a github.io or readthedocs.io address, it's a tag in your home page's <head> instead. The tag works for a site with a host name of its own, such as name.github.io. A site in a folder of one, such as name.github.io/project, can have the free check but not a schedule.

Before a change is published

If the site is built on GitHub, the build check reads each proposed change as it would be published, and lists the broken links it adds, links to other websites included, before anyone can follow them. It's free on every plan.

Other documentation tools

The same notes for MkDocs, Sphinx, VitePress and mdBook.