Rotproof

Check a Sphinx 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 Sphinx: what Sphinx 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 Sphinx checks itself

Sphinx warns about a cross-reference that points nowhere. -W turns warnings into errors, and -n makes it report more of them.

It also has a link checker built in. sphinx-build -b linkcheck requests every link to another website and lists the ones that fail.

What that leaves out

The built-in checker runs only when someone runs it, and its report goes to whoever reads the build log. It makes one attempt at each link, so a site that refuses automated requests shows up as broken until you add it to linkcheck_ignore.

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 Sphinx site

Sphinx writes plain HTML files, so your links are in the HTML your server sends and Rotproof can read them, the free check included. That's true on Read the Docs as well.

Sphinx doesn't write a sitemap by default, and Read the Docs publishes one that lists your project's versions, not every page. Without a sitemap of pages, Rotproof reads your home page only. The sphinx-sitemap extension adds one.

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 Docusaurus, MkDocs, VitePress and mdBook.