惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

博客园 - Franky
Apple Machine Learning Research
Apple Machine Learning Research
月光博客
月光博客
Vercel News
Vercel News
Recent Announcements
Recent Announcements
B
Blog RSS Feed
Y
Y Combinator Blog
M
MIT News - Artificial intelligence
MongoDB | Blog
MongoDB | Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
雷峰网
雷峰网
D
Docker
Jina AI
Jina AI
IT之家
IT之家
人人都是产品经理
人人都是产品经理
L
LangChain Blog
G
Google Developers Blog
Google DeepMind News
Google DeepMind News
MyScale Blog
MyScale Blog
博客园 - 叶小钗
The GitHub Blog
The GitHub Blog
The Cloudflare Blog
A
About on SuperTechFans
Hugging Face - Blog
Hugging Face - Blog

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
Broken Links Are Costing You More Than You Think
Jonathan Pim · 2026-05-26 · via DEV Community

Broken Links Are Costing You More Than You Think

We all know that a good user experience is paramount. Visitors arrive at your site looking for information, a product, or a service. When they click a link and hit a 404 error, that’s not just an annoyance. It’s a dead end. For a WordPress agency, this directly impacts client satisfaction and can lead to lost business. For your own site, it’s a frustrating experience for potential customers and a clear signal to Google that your site isn’t well-maintained.

Broken links accumulate silently. A page is renamed. A post is deleted. A plugin's internal routing changes. These are common occurrences, especially in the dynamic world of WordPress development. The result is a growing list of untrustworthy links that erode authority and frustrate users.

Finding the Culprits: Beyond the Manual Click

Manually clicking through every link is impractical for anything beyond a small brochure site. You need automated tools.

Curl for Site-Wide Checks

The curl command-line tool, often used for transferring data, can be repurposed for link checking. While not a dedicated crawler, a simple script can fetch pages and check HTTP status codes. This is a good starting point for quick checks on smaller sites or for verifying specific sections.

A basic approach involves fetching each page and then parsing the HTML for <a> tags, checking the href attributes. However, curl itself doesn't recursively crawl. For a full crawl, we often combine it with other tools or shell scripting.

A more efficient curl-based approach for checking the current page's links, though not recursive:

curl -s https://yourdomain.com/ | grep -oP 'href="\K[^"]+' | while read url; do
  if [[ "$url" =~ ^/# ]]; then
    continue # Skip internal fragment links
  elif [[ "$url" =~ ^// ]]; then
    checked_url="https:$url"
  elif [[ "$url" =~ ^/ ]]; then
    checked_url="https://yourdomain.com$url"
  else
    checked_url="$url"
  fi
  status=$(curl -Is "$checked_url" | head -n 1 | awk '{print $2}')
  if [ "$status" != "200" ] && [ "$status" != "301" ] && [ "$status" != "302" ]; then
    echo "Broken link found: $checked_url (Status: $status)"
  fi
done

Enter fullscreen mode Exit fullscreen mode

This script fetches the homepage, extracts href attributes, resolves relative URLs, and checks their status. It's a rudimentary example and would need expansion for comprehensive crawling.

Browser Extensions for On-Page Audits

Browser extensions offer a more user-friendly and interactive way to find broken links, especially during development or for spot-checking specific pages.

  • Link Checker (Chrome/Firefox): This is a simple, effective extension. Once installed, navigate to a page on your site, activate the extension, and it will scan all the links on that page. It highlights broken links directly on the page and provides a report in a sidebar, showing the broken URL and its status code. It's excellent for quickly auditing content pages, blog posts, or landing pages.

  • Check My Links (Chrome): Similar to Link Checker, this extension scans a page and visually marks broken links with a red border. It’s very intuitive for identifying issues on the fly.

WordPress-Specific Pitfalls

In WordPress, certain actions are notorious for creating broken links if not handled carefully.

Permalink Changes

When you edit a post or page and change its slug (the part of the URL after the domain), the old URL will become a 404. WordPress itself doesn't automatically redirect the old URL to the new one unless you have a plugin that handles this.

Deleted Posts and Pages

The most obvious culprit: deleting a post or page. Any link pointing to that deleted content will break. If the deleted content was linked from other pages on your site or from external sites, those links become dead ends.

Plugin-Generated Pages or Links

Some plugins generate their own pages or manage links. If a plugin is deactivated, uninstalled, or its configuration is changed in a way that alters its URL structure, existing links to those generated pages can break. This is particularly common with e-commerce plugins, membership sites, or custom post type archives if the plugin's routing changes.

Internal vs. External Links

Remember that broken links can be internal (pointing to your own site) or external (pointing to another website). While you have more control over internal links, an external site changing its URL structure can also break links on your site. Tools will typically report both.

The Cost of Neglect

Beyond user frustration, Google sees broken links as a sign of a neglected website. This can negatively impact your search engine rankings. Every 404 is a missed opportunity to rank for that content and a potential loss of traffic. For agencies, recurring link audits should be a standard part of your maintenance packages. Identifying and fixing these issues proactively demonstrates diligence and enhances the perceived value of your services.

Regularly scanning your site with tools like Screaming Frog (a more powerful, desktop-based crawler) or using services like Ahrefs or SEMrush's site audit features can help maintain site health. For a more immediate, developer-centric approach, integrating these checks into your CI/CD pipeline, or even a simple post-deployment script, can catch many issues before they impact live users. Address them systematically: fix internal links by updating them to valid URLs, and for critical external links that have broken due to an external site's change, consider removing them or finding an alternative resource.


SiteVett checks this automatically as part of a free website QA scan with 60+ checks across security, SEO, content, performance, and more.