Moving a website without breaking its links

Websites accumulate links the way old houses accumulate paint. Every post you have published, every page someone bookmarked, every mention in an article or a CV points at an address. When I moved my homepage to a new host and turned this WordPress site into the blog, the real job was not the design. It was making sure none of those addresses stopped working.

The plan

The main site at tristanhotham.com is now a single hand-built page. The blog lives at blog.tristanhotham.com. That meant two things had to be true: anyone following an old post link had to land on the same post at its new address, and anyone following an old page link (Research, Contact, Media) had to land on the matching section of the new homepage.

Redirects do the work

A redirect is a rule that says: if someone asks for this address, send them to that one instead. I wrote a short list that maps dated post addresses, categories and the feed to the blog, and old pages to sections of the homepage. Each rule is a permanent (301) redirect, which also tells search engines the move is deliberate.

Where it went wrong

  • My first set of redirects sat in a configuration file the upload method simply ignored. Nothing errored; the links just did not work. The fix was a plain redirects file that the host actually reads.
  • One upload went to a brand-new site rather than the existing one, so the live address kept showing the old version. Checking the live address, not the preview, caught it.
  • Cached pages made me think fixes had not worked when they had. Testing against a specific version of the site avoided the confusion.

A checklist

  1. List your important old addresses before you touch anything.
  2. Decide where each one should land.
  3. Back up your DNS records and keep email records untouched.
  4. Add the redirects and test a handful of real old links.
  5. Check on a phone and in a private window, not just your own browser.

Moving a site is mostly a promise: everything you pointed people to still works. That promise is cheap to keep if you plan the redirects first and expensive to repair afterwards.