Skip to content
Learn with RV – Tech Blog
Learn with RV – Tech Blog

#testautomation #qa #programming #linux #devops

  • Home
  • Who am I?
  • 1-on-1 Mentoring
  • 18 Testimonials
  • YouTube
  • LinkedIn
  • Contact
Learn with RV – Tech Blog

#testautomation #qa #programming #linux #devops

broken-link-checker-image
August 23, 2023September 27, 2024

How to scan your website to spot potential BROKEN LINKS

I recently discovered a broken-link-checker Javascript library that a few minutes later was identifying broken links that I was not aware of, in the project that I’ve been working on.

This blog article is about broken-link-checker, an NPM dependency that you can use to find broken links, missing images, and so on in your web application.

Prerequisites

NodeJS & NPM – Setup tutorial here

Installation

npm install -g broken-link-checker

Run

  • scan only the links on the current page
blc https://qa-practice.netlify.app
 
  • scan links recursively in the entire project (current page, other pages, and subpages; adding -ro flag)
blc https://qa-practice.netlify.app -ro
 
  • exclude external domains (adding -e flag)
blc https://qa-practice.netlify.app -roe
 
  • exclude specific domain URLs (e.g. Twitter and LinkedIn; using –exclude flag)
blc https://qa-practice.netlify.app -ro --exclude twitter --exclude linkedin

Note: For additional options, you can run

blc --help

Output

link-checker-output

NOTE: you can use the tool as project dependency as well

I created a step by step tutorial HERE

Enjoyed this article? Make sure to subscribe to my YouTube Channel for more Test Automation tutorials, and follow me on LinkedIn and Twitter for regular insights.
Looking to accelerate your test automation journey?
I’ve designed a personalized 1-on-1 mentoring program tailored to boost your skills. Reach out at iamqarv@gmail.com for more details 🚀

Post Views: 101

Related

Share this article:
Tools

Post navigation

Previous post
Next post

Recent Posts

  • Using cross-env in Your Node.js Projects: A Practical Guide
  • How to copy-paste text from clipboard using TestCafe
  • How to copy-paste text from clipboard using Cypress
  • How to repeat any CLI Command for X times using NPM repeat-cli-command
  • k9s: A Guide to Master Kubernetes Clusters from your Terminal

Recent Comments

  1. Paul on Web Accessibility: A step-by-step guide to Testing with pa11y
  2. Automated Tests for website Accessibility with Axe and TestCafe - Learn with RV - Tech Blog on How to generate E2E TestCafe Framework in seconds
  3. RV on Exploring Faker.js: A Powerful Tool for Generating Realistic Random Test Data
  4. Adrian Maciuc on Exploring Faker.js: A Powerful Tool for Generating Realistic Random Test Data
  5. Nick on Cypress vs Playwright vs Testcafe – which framework is faster?

Archives

  • June 2025
  • March 2025
  • February 2025
  • January 2025
  • November 2024
  • October 2024
  • September 2024
  • August 2024
  • July 2024
  • May 2024
  • April 2024
  • March 2024
  • February 2024
  • January 2024
  • December 2023
  • October 2023
  • September 2023
  • August 2023
  • July 2023
  • June 2023
  • May 2023
  • April 2023

Categories

  • Linux
  • Programming
  • QA
  • Tools
  • Uncategorized
©2025 Learn with RV – Tech Blog | WordPress Theme by SuperbThemes