Broken links are a common website issue that can affect user experience, website maintenance, and search engine crawling. They occur when a hyperlink points to a page or resource that is no longer available or cannot be accessed.
For example, a visitor clicks a link to a service page and sees a “404 Page Not Found” error instead. This can be frustrating for users and may prevent them from finding the information they need.
The good news is that broken links can often be identified and fixed with a few practical steps.
In this guide, we'll explore how to find broken links, understand their causes, and fix them using simple tools and techniques.
What Is a Broken Link?
A broken link is a hyperlink that fails to take a user to the intended destination.
Common examples include:
A link pointing to a deleted webpage.
An internal link containing a spelling mistake in its URL.
A link pointing to an external website that no longer exists.
An image or downloadable file that has been removed.
A page returning an unexpected server error.
Broken links may return HTTP status codes such as 404 (Not Found), 410 (Gone), or 5xx (Server Error). However, not every error response means a link is permanently broken. Temporary server problems, access restrictions, and automated request blocking can also affect the result.
Why Should You Fix Broken Links?
- Improve User Experience
Visitors expect links to provide useful information. When a link leads to an error page, users may become frustrated or leave the website.
Keeping important links functional makes navigation easier and helps visitors find relevant content.
- Help Search Engines Discover Your Content
Search engines use links to discover URLs and understand relationships between pages. Broken internal links can interrupt those pathways and make important pages harder to discover.
Fixing them helps maintain a clear and accessible website structure. However, a single broken link does not automatically cause a ranking penalty.
- Maintain Useful Internal Linking
Internal links connect related articles, product pages, and service pages. If these links stop working, visitors may miss relevant information.
Regular checks help ensure that your internal linking structure continues to support website navigation.
- Protect Important Referral Traffic
External links can bring visitors from other websites. If a high-value external link points to an unavailable resource, users may lose access to useful information.
Reviewing these links helps maintain the quality of your website's content.
How to Find Broken Links on a Website
There are several ways to identify broken links, depending on your website's size and technical setup.
Method 1: Use Google Search Console
Google Search Console is a useful starting point for identifying indexing and crawling issues.
Steps:
Open Google Search Console and select your website property.
Navigate to the Page indexing report.
Review URLs reported as not indexed and examine the reasons provided.
Investigate relevant 404 errors and determine whether the affected URLs are still linked from your website.
Fix broken internal links or redirect outdated URLs when appropriate.
Keep in mind that the Page indexing report is not a complete broken-link checker. It reports Google's indexing observations, which can include URLs that were intentionally removed or should not be indexed.
Method 2: Use a Website Crawling Tool
Website crawlers can scan pages and identify links that return error responses.
Popular options include Screaming Frog SEO Spider and other website auditing tools.
General workflow:
Enter your website's starting URL.
Run a crawl within the tool's permitted limits.
Filter the results for client errors, particularly 4xx responses.
Review the pages containing links to those URLs.
Export the results and prioritize important issues.
For a large website, crawling tools can save significant time compared with manually checking every link.
Method 3: Check Links Manually
Manual checks are useful for smaller websites or important pages.
Open the page, click the link, and verify that the destination loads correctly. If a link fails, check the URL for typing mistakes and confirm whether the destination has moved.
Avoid relying on one failed attempt alone. Some websites block automated requests or experience temporary outages.
Method 4: Check Broken Links With Python
If you want to automate basic link checking, Python can help you inspect a list of URLs.
The following example checks URLs from a text file named urls.txt. Put one URL per line.
import requests
with open("urls.txt", "r", encoding="utf-8") as file:
urls = [line.strip() for line in file if line.strip()]
for url in urls:
try:
response = requests.get(
url,
timeout=10,
allow_redirects=True
)
print(
f"{response.status_code} | "
f"{url} | Final URL: {response.url}"
)
except requests.RequestException as error:
print(f"REQUEST FAILED | {url} | {error}")
Before running the script, install the required library:
pip install requests
This script checks a supplied list of URLs; it does not automatically crawl every page on a website. It also makes ordinary GET requests, so use it responsibly and avoid sending excessive requests to websites you do not control.
A failed request does not always mean the destination is permanently unavailable. Review the result before deciding what action to take.
How to Fix Broken Links
Once you identify a broken link, the correct fix depends on what happened to the destination.
Fix 1: Correct the URL
If the link contains a spelling mistake or incorrect path, update it to the correct destination.
For example:
Incorrect:
https://example.com/servicees
Correct:
https://example.com/services
Always verify that the corrected destination loads successfully.
Fix 2: Add a Relevant Redirect
If a webpage has moved permanently, a server-side 301 redirect may be appropriate.
For example:
/old-seo-guide → /seo-guide
Redirects should lead to the closest relevant replacement. Avoid redirecting unrelated deleted pages to the homepage simply to eliminate 404 responses.
Fix 3: Restore the Missing Page
If an important page was deleted accidentally, restoring the original page may be the best solution.
This is especially useful when the page contains valuable information or has backlinks pointing to it.
Fix 4: Remove Unnecessary Links
Sometimes a page or resource has been intentionally removed and has no suitable replacement.
In that case, remove the outdated link or replace it with a useful alternative. A genuine 404 or 410 response may be appropriate when the content is permanently gone.
Fix 5: Update External Links
If an external website has moved its content, look for the publisher's updated URL or another reliable resource covering the same subject.
If no suitable alternative exists, remove the link rather than directing readers to an unrelated page.
How Often Should You Check for Broken Links?
The ideal frequency depends on the size and update schedule of your website.
Small websites: Check important links monthly or after significant updates.
Business websites: Include link checks in regular website maintenance.
Large websites: Use scheduled crawls and monitor important technical issues continuously where practical.
After fixing a broken link, revisit the affected page and confirm that the link now works as expected.
Final Thoughts
Broken links are a normal part of website maintenance, especially when content changes or pages are removed. The important thing is to identify them early and choose the right solution for each situation.
Start by checking your most important pages, use tools to identify problematic URLs, and correct, redirect, restore, or remove links according to the circumstances.
A well-maintained website is not just easier for search engines to crawl. It also helps visitors find the information they came for without unnecessary frustration.
Top comments (0)