To find broken links on a website, run a link checker that follows every link on every page and reports the ones that return an error or point to a missing file. For a static HTML site you can check internal links on your own computer before you publish, then check the live site and your links to other websites every few months. Fix each one by correcting the path, restoring the missing file, updating the address or removing the link.
This guide explains what causes broken links, how to find them on a static site, how to fix them, and how to stop them coming back.
What counts as a broken link
A broken link is any link or reference that does not lead where it should. That includes more than the obvious "page not found" error:
- Internal page links that point to a page that was renamed, moved or deleted.
- Missing resources, such as images, stylesheets, scripts or PDF downloads with a wrong path. These often show up as broken image icons or pages with no styling.
- External links to other websites that have moved, changed their URLs or shut down.
- Anchor links, such as
href="#pricing", where no element on the page has that id anymore. - Email and phone links with typos in the address or number.
Why websites get broken links
Most broken links on small sites come from a handful of everyday causes:
| Cause | Typical example |
|---|---|
| Renamed or moved page | services.html moved into a services/ folder, but old links were not updated |
| Typo in the path | abuot.html instead of about.html |
| Case mismatch | The file is Photo.JPG but the link says photo.jpg. It works on Windows but breaks on many web servers |
| Deleted file | An old image was removed while a page still uses it |
| Absolute path to your own PC | file:///C:/Users/... paths that only work on your computer |
| Missing protocol on external links | href="www.example.com" instead of href="https://www.example.com" |
| Link rot | Another website reorganized or closed |
How to find broken links
1. Check internal links before you publish
The most reliable time to catch broken internal links is on your own computer, before uploading. A desktop link checker or website editor can read every HTML file in your site folder and confirm that each linked page, image, stylesheet and script exists at the path given. This is fast, works offline and catches problems before any visitor sees them.
2. Crawl the live site
After publishing, a crawler that visits your live pages confirms that everything uploaded correctly and that the server agrees with your file names. This is where case mismatches and files you forgot to upload show up. Many link checking tools, both online and desktop, can crawl a site from its home page.
3. Check Google Search Console
If your site is verified in Google Search Console, its page indexing report lists URLs Google tried to crawl that returned "Not found (404)". That can reveal broken links from other sites pointing at old addresses on yours.
4. Check external links on a schedule
Links to other websites can break at any time without you changing anything. Checking them every few months is a reasonable routine for most small sites.
5. Spot-check by hand
Automatic tools are thorough, but a quick manual pass through your main navigation, footer and contact links on desktop and phone catches anything odd, such as a link that works but goes to the wrong page.
How to fix each kind of broken link
- Wrong path or typo: correct the
hreforsrcso it matches the real file location and spelling, including upper and lower case. - Renamed or moved page: update every link that points to the old name. Use find and replace across the site, or a tool that updates links when you move a page.
- Deleted page or file: restore it, link to the closest replacement, or remove the link. If other sites link to the old address and your host supports it, set up a redirect to the new page.
- Missing anchor: add the
idback to the target section, or change the link to match the new id. - Dead external link: look for the new address on the other site, link to an equivalent source, or remove the link.
- Forgotten upload: upload the missing file to the right folder on the server.
After fixing links, publish the changes and check the live site again. If you still see the old problem, your browser may be showing a cached copy. A private window or a hard refresh usually confirms whether the fix is live.
How to prevent broken links
- Use lowercase file names with hyphens, such as
contact-us.html. No spaces, no capital letters. - Use relative paths for your own pages and files so the site works the same on your PC and the server.
- Plan your folder structure early so you rarely need to move pages later.
- Rename and move pages with a tool that updates links, not by renaming files in File Explorer.
- Run a check before every publish. It takes moments and saves visitors from dead ends.
The easier way: check links site-wide in Apollo Editor
Apollo Editor treats your website as a whole folder of pages, not just one file at a time, which makes broken links much easier to catch and avoid.
- A site-wide broken link checker reports links and references that point to missing pages or files.
- When you rename or move a page in Site Explorer, Apollo Editor offers to update internal links to it automatically.
- Find and replace across files fixes an old address everywhere in one pass.
- The hyperlink editor writes relative paths for pages in your site, so links work locally and after upload.
Publishing then identifies changed files and keeps a log, so you can upload your fixes and confirm they went through. Related guides: how to add links in HTML, images not showing on your website and find and replace across a website.
Frequently asked questions
What causes broken links?
Renamed or moved pages, typos in addresses, deleted images, case differences in file names and external sites that change or disappear.
Do broken links hurt SEO?
A few are normal on any site, but many broken links make a site harder to crawl and frustrate visitors, so fix them regularly.
How often should I check for broken links?
Before every publish for internal links, and every few months for links to other websites.
