Find and Fix Old URLs That 404 After a Website Redesign

A step-by-step guide to finding the old pages your redesign broke, mapping each one to the right new page, and adding 301 redirects in Apache, Nginx or WordPress. Includes a mapping template, copy-ready rule formats and a final checklist.

A new website usually brings new page addresses. The old "/rooms.html" becomes "/accommodations/", or "/services/roof-repair.php" becomes "/roof-repair/". The new site looks great, but every old address that people bookmarked, that other sites linked to, or that search engines indexed may now show a "page not found" error.

The fix is a 301 redirect. It is a permanent forwarding instruction that sends visitors and search engines from the old address to the new one. This guide walks you through finding the broken old addresses, choosing where each should go, and adding the redirects yourself.

What you need

Step 1: Build a list of your old URLs

Your new site no longer knows about the old pages, so you need outside sources. Use as many of these as you can:

  1. The Wayback Machine (Internet Archive). Search for your domain there. Its results include a list of archived URLs for your site. If you are comfortable with a little technical work, search for "Wayback CDX server API." It lets you download every archived URL for your domain as a plain list. Useful settings include matching your whole domain with a wildcard, keeping only pages that were archived with a 200 (OK) status, and collapsing duplicates.
  2. Google Search Console. If you have it set up, open the Pages report and look under "Not found (404)." These are old addresses Google is still trying to reach.
  3. Your old sitemap. If you or your developer kept a backup of the old site, its sitemap.xml file lists the old pages.
  4. Analytics. Look at landing pages from the months before the redesign.
  5. Your own materials. Check brochures, business cards, directory listings, social media bios and email signatures. These often point to specific old pages.

Paste everything into one spreadsheet column.

Step 2: Clean the list

Archive and crawl data is messy. Before you check anything, remove or merge these:

You should end up with a list of old *paths*, like "/rooms.html" or "/about-us.php".

Step 3: Check what each old URL does now

For each path, find out what your live site returns. A free desktop crawler can do this from an uploaded list. You can also use the command line. Put the full old URLs in a text file called old-urls.txt, one per line, and run:

``` while read url; do printf "%s " "$url" curl -s -o /dev/null -w "%{http_code} %{redirect_url}\n" "$url" done < old-urls.txt ```

Record the result in your spreadsheet:

Watch for chains and loops. A chain is when A redirects to B, which redirects to C. A loop is when A redirects to B, which redirects back to A. To see every hop, run `curl -sIL "$url"` on one address and read each "Location:" line.

Step 4: Decide where each dead URL should go

This is the part that matters most. Follow these rules:

  1. Redirect to the closest equivalent page. For example, the old "Garden Room" page should go to the new Garden Room page, not to the general rooms page, if a specific page exists.
  2. Use the nearest parent page if there's no exact match. A discontinued product can go to its category page.
  3. Don't send everything to the homepage. Google's own guidance says redirects to irrelevant pages may be treated as "soft 404s." Visitors also find it confusing.
  4. Let some pages stay 404 (or 410). Old promotions, expired events and pages with no modern equivalent can simply be gone. That is a legitimate answer.
  5. Point straight to the final address. Never redirect to a URL that itself redirects.

Fill-in mapping template

Set up your spreadsheet with these columns:

| Old path | Current status | New target | Action | Reason | |---|---|---|---|---| | | | | 301 / leave 404 | |

Worked example (hypothetical B&B)

| Old path | Current status | New target | Action | Reason | |---|---|---|---|---| | /rooms.html | 404 | /accommodations/ | 301 | Same content, renamed | | /garden-room.html | 404 | /accommodations/garden-room/ | 301 | Exact equivalent exists | | /directions.php | 404 | /contact/ | 301 | Map and directions now on contact page | | /breakfast-menu.pdf | 404 | /dining/ | 301 | Menu now shown on dining page | | /valentines-2021.html | 404 | — | Leave 404 | Expired offer, no equivalent | | /about-us.html | 301 to /about/ to /our-story/ | /our-story/ | Fix chain | Point directly to final page |

Step 5: Add the redirects

Use one method, the one that matches your setup. Adding the same redirect in two places can cause loops.

Apache (.htaccess)

Add these lines near the top of the .htaccess file in your site's root folder. Back up the file first.

``` Redirect 301 /rooms.html /accommodations/ Redirect 301 /garden-room.html /accommodations/garden-room/ Redirect 301 /directions.php /contact/ Redirect 301 /breakfast-menu.pdf /dining/ ```

"Redirect" matches the start of a path. That means "/rooms.html" would also catch "/rooms.html-something." For exact-only matching, use RedirectMatch with an anchored pattern:

``` RedirectMatch 301 ^/rooms\.html$ /accommodations/ ```

Nginx

Add these inside the relevant `server { }` block, then test and reload. Running `nginx -t` checks your config before you reload.

``` location = /rooms.html { return 301 /accommodations/; } location = /garden-room.html { return 301 /accommodations/garden-room/; } location = /directions.php { return 301 /contact/; } location = /breakfast-menu.pdf { return 301 /dining/; } ```

The `=` means an exact match, which is usually what you want for one-to-one redirects.

WordPress (Redirection plugin)

If you use the free Redirection plugin, you can import a CSV file instead of typing each rule. The basic format is the source path and the target path, one redirect per row:

``` source,target /rooms.html,/accommodations/ /garden-room.html,/accommodations/garden-room/ /directions.php,/contact/ /breakfast-menu.pdf,/dining/ ```

Import it from the plugin's Import/Export area. Check the plugin's own help text for optional columns, such as the redirect code or regex. Then confirm the imported rules are set to 301.

Note: if WordPress runs on Apache or Nginx, plugin redirects only fire when WordPress handles the request. Some static files, such as an old PDF path, may be served or blocked by the server before WordPress sees them. If a PDF redirect doesn't work through the plugin, add it at the server level instead.

Step 6: Test everything

Run the Step 3 script again on your list of fixed URLs. Each one should now show 301 followed by the correct destination. That destination should itself return 200. Also check:

Quick checklist

A note on doing it yourself vs. getting help

Everything above can be done for free with the tools described. The time-consuming parts are usually pulling and cleaning the archive data and making the mapping decisions. If you'd rather have the dead-URL list, a suggested redirect map and paste-ready rules prepared for you, that's what our paid kit below covers. It is AI-assisted, based on public archive data and a crawl of your site, and you still review and install the rules yourself.

More templates and kits
Browse the Quillwork shop