serverserv serverserv

Broken link checker: free n8n workflow template

By Siam Ahmed, software engineer · 3 min read · Updated

Broken links hurt visitors and SEO. Every Monday this workflow opens a page on your site, tests every link on it that points to the same site, and emails you a list of the ones that return an error or do not answer.

Download the template

Free download
7 nodes · tested on n8n 2.46 · MIT licence · no credentials included
Download JSON

How it works

  1. Every Monday at 8 starts the scan.
  2. Page to scan holds the page to check, for example your homepage or a page that lists all your pages.
  3. Get page downloads the page and Extract links collects up to 200 unique links on the same site.
  4. Check link requests each one with a 10-second timeout and follows redirects.
  5. Collect broken keeps links that return 400 or higher or no answer, and Email alert sends one report. No email is sent when nothing is broken.

Nodes used: Schedule Trigger, Code, HTTP Request, Send Email.

What you need

  • Any SMTP account to send email from

Set it up

  1. Import the workflow and set startUrl in Page to scan, with https://.
  2. Open Email alert, add an SMTP credential and set the from and to addresses.
  3. Activate the workflow. To test, add a link to a page that does not exist and run it once.

Ways to customise it

  • Scan several pages by listing more URLs in Page to scan.
  • Include links to other websites by removing the same-host check in Extract links.
  • Post the report to Slack or save it to a Google Sheet.

Where to run it

Scheduled workflows need n8n running all the time. You can try it on your own computer, but for real use it belongs on a server. serverserv n8n Hosting gives you n8n pre-installed on your own KVM server with HTTPS, from $13.39 a month, or $8.39 a month on a 3-year term, with no execution limits.

Questions

Does it crawl my whole website?

No. It checks every same-site link on the page you choose, up to 200. Point it at a page that links to all your pages, or list several pages, for wider coverage.

Is this n8n template free to use?

Yes. It is free under the MIT licence, for personal and business use.

Sources

Plans from $2.99/moSee plans