RankDossier
Guide

Broken links and redirects: find and fix each 404 and redirect chain

A broken link is a link to an address that no longer works – usually a 404 page or a server error – and a redirect chain is a series of redirects that a visitor or a crawler must follow before reaching the final page. A broken link checker finds both by requesting every linked address and recording its status. This guide explains the statuses, which redirect to use, what to check after a migration and in what order to fix everything.

Broken links and redirects · Author: The RankDossier team · Updated:

Check your own site Start the free pre-check

404 and soft 404

A 404 status says that the address does not exist. It is the correct answer for a deleted page without a replacement, and such addresses should leave the index over time. A soft 404 is a page that answers 200, “all fine”, while it shows an error message or almost no content, so the status contradicts the page.

A real 404 does not hurt the rest of the site. The problems are the links that lead to it and important pages that return it by mistake.

When many URLs change at once, plan the redirects with the website migration SEO checklist before launch, not after.

Property sites meet this every day when a home is sold; real estate SEO explains what to do with sold and expired listings.

StatusWhen it is the right answer
Page deleted, no replacement404 or 410Always; Google treats both as a missing page
Page moved to a new address301 or 308When the content lives on at the new address
Address never existed404Always; the server must not answer 200
Short maintenance503For a short downtime only; a long one needs a real fix
Temporary campaign page302 or 307When the old address will come back

How the audit tests it

RankDossier requests an address that cannot exist on your site and checks that the answer is 404. A 200 is reported as NOT_FOUND_SOFT, because search engines may otherwise index empty or wrong pages.

Broken internal links are links between your own pages that lead to an error, and they are the ones to fix first: you control them fully, visitors hit them while browsing and crawlers waste requests on them. They appear after deleted pages and changed addresses, from typing errors in hand-written links and from content copied from a test site.

The audit lists each broken internal link together with the pages that contain it (LINK_BROKEN_INTERNAL), so a single fix in a template can remove hundreds of entries. How links fit into the structure of the site is explained in the guide on internal linking for SEO.

  • Fix the link at its source – the template, the menu or the text – instead of adding a redirect for a typing error.
  • If many links point to a deleted page, redirect that page to its closest equivalent and update the links as well.
  • Check images too: a missing image file is a broken link of its own (IMG_BROKEN).

Broken external links point to other sites that no longer answer or return an error. They do not break your site, but they send visitors to dead ends and make the page look unmaintained.

  • Replace the link with the new address of the source, a newer source or an archived copy, or remove it.
  • Recheck by hand the links to sources that block automated requests – a crawler may get an error that a browser does not.
  • Check external links regularly on pages that cite many sources, such as guides and documentation.

RankDossier checks external links up to a limit set by each paid package and reports dead ones as LINK_BROKEN_EXTERNAL. The report says how many links were measured and which of them gave no definitive answer. The free pre-check does not test external links.

Redirect chains

A redirect chain is a series of two or more redirects between the requested address and the final page, for example from http:// to https://, then to the www host and then to a new path. Each hop adds waiting time and crawlers follow only a limited number of hops, so redirect every old address straight to its final destination. A redirect loop, where two addresses redirect to each other, makes the page unreachable.

  • Find chains by following every redirect to its end and counting the hops; the audit checks the variants of the main address (REDIRECT_CHAIN_VARIANT).
  • Update internal links to the final address (LINK_TO_REDIRECT).
  • After several migrations, flatten old redirect rules so that each of them points to the current address.

Example: one hop instead of three

The example below is illustrative: /a is the old path and /b the new one.

  1. Before: http://example.com/a → https://example.com/a → https://www.example.com/a → https://www.example.com/b.
  2. After: http://example.com/a → https://www.example.com/b, with a single 301.
  3. Internal links, the canonical tag and the sitemap all name https://www.example.com/b directly.

301 or 302

Use a permanent redirect – 301 or 308 – when a page has moved for good, and a temporary one – 302 or 307 – only when the old address will return.

The audit reports temporary redirects where a permanent one is expected (REDIRECT_NOT_PERMANENT).

CodeMeaning for GoogleUse it for
Permanent301, 308A strong signal that the target is canonicalMoved and merged pages, a new domain, HTTP to HTTPS
Temporary302, 303, 307A weak signal; the old address may stay in searchA/B tests, short campaigns, temporary maintenance pages
Instant meta refreshHTMLTreated like a permanent redirectOnly when the server cannot send a redirect
JavaScript redirectScriptSeen only after the page is renderedA last resort

HTTP to HTTPS and the host variants

Every site has at least four variants of its main address – http:// and https://, with and without www – and all of them should lead to one canonical host with a single permanent redirect. Otherwise two versions of the site may compete in search, and some visitors stay on the insecure one.

  • http:// redirects to https:// on every path, not only on the home page (HTTP_NOT_REDIRECTED).
  • The other host variant, with or without www, redirects to the canonical one in the same single hop (REDIRECT_CHAIN_VARIANT).
  • Internal links, canonical tags, hreflang and the sitemap use only the canonical host and https:// (LINK_HTTP_INTERNAL, LINK_HOST_VARIANT).
  • After the switch to HTTPS, the Strict-Transport-Security header can tell browsers to request https:// directly.

After a migration

A migration – a new domain, a new platform or a new structure of addresses – changes many addresses at once, so it can create many broken links and redirect chains. Plan the redirects before the switch, as a map from every old address to its new equivalent, and test the map on the live site right after the switch.

Once the redirects work, go through the SEO checklist for the whole site, because a migration touches titles, canonical tags, the sitemap and internal links at the same time.

  1. Export every old address: from the old sitemap, a crawl of the old site, the performance report in Search Console and the pages that other sites link to.
  2. Map each old address to the closest new page; when nothing equivalent exists, let the old address return 404 or 410 instead of redirecting it to the home page.
  3. Implement 301 redirects on the server, with one hop each, and keep them for at least a year, as Google recommends.
  4. Update internal links, canonical tags, hreflang and the sitemap to the new addresses.
  5. After the switch, request every old address and check that it ends on a 200 page after one redirect; then crawl the new site for broken links.
  6. Watch the page indexing report and the 404 examples in Search Console over the following weeks.

Moving to a new domain

When the domain changes as well, use the Change of Address tool in Search Console after the redirects are live, and keep the old domain registered so that the redirects keep working.

How to fix them: the order of work

Fix redirects and broken links from the biggest impact to the smallest: first what breaks important pages or the whole site, then what affects templates, then single links. Check each step on the live site before you move to the next one.

  1. Problems for the whole site: server errors, http:// not redirected to https://, missing addresses that answer 200.
  2. Broken internal links in menus, footers and templates.
  3. Redirect chains and loops on the variants of the main address and on old addresses.
  4. Internal links to redirects in texts and templates.
  5. Temporary redirects that should be permanent.
  6. Broken external links and broken images.

What RankDossier checks

A RankDossier audit runs more than 320 checks, including the ones named in this guide. It crawls the site up to the page limit of its package and says so when the limit is reached (CRAWL_LIMIT_REACHED), so a report never claims to cover pages it did not reach. The free pre-check reads up to 10 pages with code only and does not test external links.

Sources: Google documentation

Terms from this chapter in the glossary: Broken link

Questions and answers

  • A tool that requests every link on a site and records the status of each target. It reports links that end in a 404, a server error or another failure, and usually redirects and redirect chains as well.

  • Broken internal links waste crawling and can hide pages from search engines; broken external links mainly hurt visitors. A 404 for a deleted page is normal and does not harm the rest of the site.

  • How many redirects in a chain are too many?

    Aim for a single hop. Every extra hop adds waiting time, and crawlers follow only a limited number of hops before they stop.

  • Should I redirect all 404 pages to the home page?

    No. Redirect a missing page only to a close equivalent. Mass redirects to the home page can confuse visitors, because they do not find what they were looking for.

  • Is 308 better than 301?

    For Google both are permanent redirects with the same effect. Use the one your server and framework support well; 308 also keeps the request method, which matters for forms and APIs.

  • How long should I keep redirects after a migration?

    Google recommends keeping them for as long as possible, generally at least a year. Links from other sites and bookmarks keep using the old addresses much longer.

  • It checks the pages it crawls, up to the page limit of the package, and external links up to the limit of the package; the report says when a limit was reached. The audit cannot find a page that no internal link and no sitemap points to; other crawlers may still know it from links on other sites.

Also read

Check your own site

Enter a domain – the free pre-check reads up to 10 pages and shows how many types of problems it finds. You pay only if you want the full report.

Start the free pre-check