Redirect old URLs after a redesign

Map old addresses to new ones, add 301 redirects in .htaccess, and verify no important page is left returning 404.

TutorialIntermediate30 min to completeLast updated
On this page
  1. What you’ll need
  2. Step 1: Collect old URLs
  3. Step 2: Map each to its best match
  4. Step 3: Write the rules
  5. Step 4: Test a sample
  6. Step 5: Check for 404s
  7. Check it worked
  8. If something goes wrong
Level
Intermediate
Time
About 30 min
Steps
5
You’ll finish with
A working result, checked

5 steps

What you’ll need

  • A list of your old URLs (from a sitemap, analytics or Search Console)
  • DirectAdmin access

Changing URLs without redirects loses search rankings and breaks bookmarks and links from other sites. A redirect map keeps them working.

Step 1: Collect old URLs

Export URLs from your old sitemap, analytics landing pages and Google Search Console’s pages report. Prioritise pages with traffic or external links.

Step 2: Map each to its best match

In a spreadsheet, list each old URL beside its closest new equivalent. Avoid sending everything to the home page.

Step 3: Write the rules

Turn each row into a line at the top of public_html/.htaccess:

Redirect 301 /services.html https://yourdomain.co.uk/what-we-do/
Redirect 301 /contact-us.php https://yourdomain.co.uk/contact/

For whole sections, use RedirectMatch. Redirects with .htaccess: copy-ready examples

Step 4: Test a sample

Visit several old URLs in a private window and confirm each lands on the right page in one hop.

Step 5: Check for 404s

Over the next few weeks, check the access log and Search Console for old URLs still returning 404, and add rules for them. 404 Not Found: why pages are missing and how to fix it

Check it worked

Every old URL on your list returns a single 301 to its mapped page, confirmed with a redirect checker.

If something goes wrong

What happensWhat to do
Redirect loopsA rule’s target matches its own pattern. “Too many redirects” and HTTPS redirect loops
500 error after saving.htaccess syntax. What is .htaccess? A practical guide

Traxio accounts include SSH, Git, cron and PHP 7.4 to 8.4. Try the PHP hosting is £0.99 a month.

Where this fits: DirectAdmin hosting explains the control panel every Traxio account uses, with a tour and tutorials.

Spotted something out of date or unclear? Tell us and we’ll fix it.

Keep going