Sub topic 3
Deciding What to Fix First
Assume you know basic URLs, HTML links, command-line use, and how a web server or CMS works. Fix link problems by their user and search impact, not by the number of errors alone.
| Problem | First action |
|---|---|
| Popular internal link returns 404 | Update the source link |
| Old URL has a clear replacement | Add one direct 301 redirect |
| Content is permanently gone | Return 410 or a real 404 |
Prioritize URLs with high traffic, many inbound links, or important internal links. Fix internal links before external ones because you control them. A redirect chain is worth collapsing when several old URLs lead through multiple hops.
Fix the Link, Redirect, or Neither
Update the linking page when the destination changed. Add a permanent 301 redirect when visitors and inbound links still use the old URL. Use 410 Gone when the resource was intentionally removed and has no replacement. Do not redirect every missing URL to the home page. That creates confusing soft 404 behavior.
Configure the Server
In nginx, send an old path directly to its final destination and keep the custom error response at 404:
location = /old-page {
return 301 /new-page;
}
error_page 404 /404.html;
location = /404.html {
internal;
}In Apache, use Redirect and ErrorDocument:
Redirect 301 /old-page https://example.com/new-page
ErrorDocument 404 /404.htmlA custom 404 page should explain that the page is missing, offer site navigation or search, and preserve the 404 status. Test the status with curl -I.
> callout note > A custom error page is useful only when crawlers still receive a 404 or 410 response. A page that says “not found” but returns 200 is a soft 404.
Plan Migrations and Monitor
Before a migration, create a redirect map with one row per old URL and its final destination. Test every mapped URL for status, loops, and excessive hops. Keep redirects while external links and bookmarks still depend on them.
Run a crawler after releases. Review server logs for repeated 404s, and check Search Console for discovered errors. Add automated URL checks to deployment or scheduled monitoring so new broken links are found quickly.
Exercise
An old product URL receives traffic and has no exact replacement. What should you do?
Show answer
Keep a helpful 404 or return 410, update internal links, and avoid redirecting it to an unrelated page.