Check 18.06 · Off-page, backlinks and brand awareness

Reclaim broken links

Find the backlinks that lead to error pages on your site and redirect them with a 301 to the equivalent page on Apache, Nginx, Cloudflare, WordPress or Shopify.

Priority
Important
Difficulty
Intermediate
Estimated time
2 h to 1 day
Free, no account: your progress is saved in this browser.

Ask an AI to check this point on your site

Opens the assistant with a ready-made question: this check, its goal and your site URL.

For Gemini, Copilot or another assistant, copy the question. The link opens the chosen service directly: nothing goes through this site.

In short

A broken link, here, is a backlink that points to a URL on your site that no longer responds: a deleted page, a URL changed during a redesign, a typo in the other site's link. The link still exists, but it ends on a 404 error and serves no purpose anymore. The check consists of listing these URLs, then redirecting them with a 301 to the equivalent page, or restoring the content when it is worth it. Once done, every URL that receives external links responds 200 or redirects in a single hop to a relevant page.

Why it matters

This is the most cost-effective form of link recovery: you need nobody's agreement. The link is already there, on a site that chose to cite you; the destination URL just needs to respond again.

A URL returning a 404 is not a problem in itself for Google, which states that a 404 code is the right response for content that has gone. The loss lies elsewhere: the visitor who clicks the link lands on an error, and the signals the link brought no longer benefit any page. Google states that a permanent redirect is a signal that the target should become the canonical URL; redirecting to the real equivalent therefore extends the link's effect.

The usual causes are well known: a redesign without a complete redirect plan, a change in URL structure, the deletion of a product, an article or a downloadable resource, and links copied incorrectly by other sites (/contct, /tarif instead of /tarifs).

What it improves

  • Value of existing links Links to dead URLs once again benefit a live page.
  • Referral traffic Visitors sent by other sites land on a useful page instead of an error.
  • Experience Fewer 404s seen by human visitors.
  • Crawling Bots, which also follow these links, find a page instead of an error. A small effect.
  • Rankings An indirect effect, in proportion to the quality of the links recovered. A redirect to an unrelated page recovers nothing.

How to check

1. List the linked pages. In the Search Console Links report, open “Top linked pages”, click More and export. Paste the URLs into cibles.txt, one per line, then:

while read -r url; do
  printf "%s\t%s\n" "$(curl -s -o /dev/null -w "%{http_code}" --max-time 15 "$url")" "$url"
done < cibles.txt | grep -v -E "^(200|301|308)" | sort

Every line that remains (404, 410, 500, 302 to the home page…) is a linked URL to deal with. Also check that the 301s end on a relevant page returning 200.

2. Cross-check with the errors Google knows about. In the Page indexing report, the “Not found (404)” reason lists URLs returning errors; those that also appear in your export of linked pages come first.

3. Read the server logs. Human visits that arrived through an external link on a 404 carry the address of the originating site in the Referer field. In the “combined” log format, used by default by Nginx and often by Apache:

awk '$9 == 404 && $11 != "\"-\"" && $11 !~ /example\.com/ {print $7, $11}' /var/log/nginx/access.log \
  | sort | uniq -c | sort -rn | head -n 50

Replace example.com with your domain. Each line gives the number of visits, the requested URL and the external page that contains the link.

4. With a paid tool. Ahrefs offers a broken backlinks report in Site Explorer, and the Best by links report filtered on the 404 code ranks your dead pages by number of referring domains. Semrush shows the response code of your linked pages in the indexed pages tab of Backlink Analytics. Ahrefs Webmaster Tools gives free access to the broken backlinks of your own verified sites.

How to implement

Before you start

Build a decision table, one row per linked URL returning an error:

URL returning an error Referring domains Former content Decision Destination
/guides/infusion-the-vert 14 Brewing guide, replaced during the redesign 301 /guides/temperature-infusion/
/contct 3 None: typo in a directory 301 /contact/
/promo-noel-2023 2 Campaign over, no equivalent Leave as 410 —
/etude-prix-the-2024.pdf 22 Study deleted by mistake Restore same URL

Fictional values. Decision rules:

  1. An equivalent exists (same subject, same intent): a 301 redirect to it.
  2. No equivalent, but many links and content that is still useful: restore the page, updated, at the same address.
  3. No equivalent and outdated content: leave a 404 or a 410 with a useful 404 page (opens in a new tab). Do not redirect to the home page: Google may treat these redirects as soft 404s, see avoid redirecting all removed pages to the homepage (opens in a new tab).
  4. Typo in the link: a 301 redirect to the right page and, if the link is valuable, a message to the source site asking it to correct it.

To find out what an old URL contained, check the Wayback Machine (https://web.archive.org/web/*/example.com/guides/infusion-the-vert*).

Always target the final URL, with the right scheme, the right host name and the trailing slash, so as not to create redirect chains. The configurations below cover the essentials; the guide use 301 and 308 redirects (opens in a new tab) details each environment.

Apache

Versions Apache 2.4.

In the .htaccess file at the root of the site, before the CMS rules:

RedirectMatch 301 ^/guides/infusion-the-vert/?$ https://www.example.com/guides/temperature-infusion/
RedirectMatch 301 ^/contct/?$ https://www.example.com/contact/
Redirect gone /promo-noel-2023

Redirect gone returns a 410. In a virtual host configuration file, reload afterwards: sudo apachectl configtest && sudo systemctl reload apache2. The .htaccess file is taken into account immediately.

Nginx

Versions Nginx 1.18 and later.

For a list of URLs, a map table in /etc/nginx/conf.d/redirections-backlinks.conf:

map $uri $redirection_backlink {
    default "";
    /guides/infusion-the-vert   https://www.example.com/guides/temperature-infusion/;
    /guides/infusion-the-vert/  https://www.example.com/guides/temperature-infusion/;
    /contct                     https://www.example.com/contact/;
}

Then, in the site's server block:

if ($redirection_backlink) {
    return 301 $redirection_backlink;
}

location = /promo-noel-2023 {
    return 410;
}

Test and reload: sudo nginx -t && sudo systemctl reload nginx.

Cloudflare

Versions Cloudflare dashboard, all plans (Redirect Rules and Bulk Redirects), November 2026.

  • A few URLs: from the Rules overview, Create rule > Redirect Rule. Under “When incoming requests match”, choose “Wildcard pattern” and enter the exact source URL (https://www.example.com/guides/infusion-the-vert), then a static target URL and the 301 code. Click “Deploy”.
  • A list: Bulk Redirects, at account level (or Rules > Settings > Bulk Redirects from the zone). Create a list, import a CSV with no header row (source URL without query string, target URL, code), then enable it with a “Bulk Redirect Rule”.
www.example.com/guides/infusion-the-vert,https://www.example.com/guides/temperature-infusion/,301
www.example.com/contct,https://www.example.com/contact/,301

The host name must be proxied (orange cloud). The redirect applies at the edge, without touching the server.

AWS

Versions CloudFront (CloudFront Functions JavaScript runtime 2.0), S3 and Amplify Hosting consoles, November 2026.

With CloudFront, associate a CloudFront Function with the viewer request event:

var redirections = {
  '/guides/infusion-the-vert': '/guides/temperature-infusion/',
  '/contct': '/contact/'
};

function handler(event) {
  var cible = redirections[event.request.uri.replace(/\/$/, '')];

  if (cible) {
    return {
      statusCode: 301,
      statusDescription: 'Moved Permanently',
      headers: { location: { value: 'https://www.example.com' + cible } }
    };
  }

  return event.request;
}

Publish the function, then associate it with the relevant cache behavior. For a static site on S3, the bucket's redirection rules also work; on Amplify Hosting, use Hosting > Rewrites and redirects with the 301 type.

Plesk

Versions Plesk Obsidian 18.0 for Linux.

If Apache serves the site, use the .htaccess file from the Apache section. Otherwise, in Websites & Domains > your domain > Hosting & DNS > Apache & nginx (“Apache & nginx Settings” in the older view), “Additional nginx directives” field:

location = /guides/infusion-the-vert {
    return 301 https://www.example.com/guides/temperature-infusion/;
}

cPanel

Versions cPanel & WHM 110 and later, Jupiter theme.

Domains > Redirects: type “Permanent (301)”, the domain, the path of the broken URL, then the full destination URL. cPanel writes the rule into the .htaccess file. For more than a few dozen URLs, edit the file directly with the syntax from the Apache section.

Shared hosting

With most shared hosting providers (OVHcloud, o2switch, Infomaniak, Ionos, Hostinger), the .htaccess file from the Apache section works: upload it via FTP or the file manager, at the top of the existing file.

WordPress

Versions WordPress 6.7 to 7.1; Redirection 5.x, Rank Math 1.0.x and Yoast SEO Premium 28.x plugins.

  • The Redirection plugin (free): Tools > Redirection, then “Add New”: source URL, target URL, 301 type. The 404s tab logs the URLs requested in error, with the referrer depending on the logging options: a free way to spot broken links that receive visits. CSV import is available.
  • Rank Math: the “Redirections” and “404 Monitor” modules, included in the free version, to enable in the plugin's dashboard.
  • Yoast SEO: the redirect manager is reserved for the Premium version.

WordPress already automatically redirects the old slugs of published posts (non-hierarchical content types); this mechanism covers neither pages, nor categories, nor URLs changed outside WordPress.

Shopify

Versions Shopify admin, all plans, November 2026.

Content > Menus, then “View URL redirects”, and Create URL redirect (old address, new address) or Import for a CSV. Shopify only applies the redirect if the old URL no longer matches any existing page. For a deleted product, redirect to the product that replaces it or to its collection.

Laravel

Versions Laravel 11 to 13.

Create config/redirects.php:

<?php

return [
    '/guides/infusion-the-vert' => '/guides/temperature-infusion',
    '/contct' => '/contact',
];

Then, in routes/web.php:

use Illuminate\Support\Facades\Route;

foreach (config('redirects') as $from => $to) {
    Route::permanentRedirect($from, $to);
}

Route::permanentRedirect() returns a 301. If you use php artisan config:cache and php artisan route:cache (or php artisan optimize), run them again every time the list changes.

Next.js

Versions Next.js 15 and 16 (App Router and Pages Router).

In next.config.js (or next.config.ts):

module.exports = {
  async redirects() {
    return [
      { source: '/guides/infusion-the-vert', destination: '/guides/temperature-infusion', statusCode: 301 },
      { source: '/contct', destination: '/contact', statusCode: 301 },
    ];
  },
};

With permanent: true instead of statusCode, Next.js returns a 308, which is also permanent. Redeploy to apply.

Vercel

Versions vercel.json file, all Vercel plans, November 2026.

Outside Next.js, in vercel.json:

{
  "redirects": [
    { "source": "/guides/infusion-the-vert", "destination": "/guides/temperature-infusion", "statusCode": 301 },
    { "source": "/contct", "destination": "/contact", "statusCode": 301 }
  ]
}

Netlify

Versions _redirects file, all Netlify plans, November 2026.

In the _redirects file of the publish directory:

/guides/infusion-the-vert   /guides/temperature-infusion   301
/contct                     /contact                       301

After implementation

Rerun the test from the “How to check” section: each URL you dealt with must respond 301 to a page returning 200, or 410 if you chose to let it disappear. For a valuable link copied incorrectly by another site, write to the publisher with the exact URL: a direct link avoids a redirect and survives a future configuration change. Keep these redirects for at least a year, ideally longer, as for a redesign (opens in a new tab).

Warning: do not redirect dead URLs to an unrelated page just because they receive links. The redirect recovers nothing if the destination does not match the cited content, and the practice may be treated as a soft 404.

Common mistakes

  • Redirecting everything to the home page: convenient, but the visitor does not find what they were looking for and Google may ignore these redirects.
  • Creating chains: redirecting to a URL that itself redirects. Always point to the final destination.
  • Using a 302 for a permanent loss: choose 301 or 308.
  • Forgetting variants: with and without a trailing slash, uppercase letters, parameters. Test the exact forms found in the links.
  • Only working from Search Console: its report is a sample; server logs and a third-party tool find other linked URLs.
  • Deleting redirects during a configuration cleanup, a few months after creating them.

Frequently asked questions

Updated on

Topic checklist (PDF)

And now?

In the “Off-page, backlinks and brand awareness” topic

  1. Audit backlinks and referring domains
  2. Assess topical relevance and quality
  3. Analyze competitor backlinks
  4. Identify editorial opportunities
  5. Identify lost links
  6. Reclaim broken links
  7. Turn legitimate mentions into links where possible
  8. Build press relations
  9. Publish studies and reference resources
  10. Create free tools and useful infographics
  11. Develop industry partnerships
  12. Take part in interviews and podcasts
  13. Earn specialized citations
  14. Use legitimate professional directories
  15. Raise the profile of your experts
  16. Track new referring domains and unlinked mentions
  17. Avoid PBNs, manipulative paid links and excessive link exchanges
  18. Use rel=sponsored for paid links
  19. Use rel=ugc if relevant
  20. Reserve disavowal for justified cases