Back to the journal
Website maintenance3 min read

Before you rebuild a website, protect its useful URLs

In brief

How to handle existing addresses, redirects and missing pages when replacing a website.

Someone has bookmarked a technical guide on your website. You replace the site, move the guide and change its address. When that person returns, the bookmark opens an error page. The same thing can happen to a link in an article or a search result.

A little preparation before the new site launches can spare visitors that trouble.

Collect the old addresses

Start with the current sitemap and crawl the website if you can. Add addresses from analytics, search reports and any backlink export available to you. Remember that a PDF or an image may have its own incoming links even if it is no longer accessible from the menu.

For each URL, record the content it contains and where that content will live on the new site. If you have several versions of a page, note which one is intended for indexing.

Decide how each address should behave

The easiest URL to preserve is one that stays the same. Where a page has moved permanently, return a 301 or 308 redirect to its new address. Google documents both status codes as permanent redirects in its guidance on site moves.

Match the old page with the closest relevant replacement. If the original was a product manual, redirect it to the new manual for that product. Sending all missing pages to the homepage leaves people looking for the same information again, and search engines may treat such redirects as soft 404 errors.

For content that has been withdrawn and has no equivalent, return an appropriate 404 or 410 response. A helpful error page can still offer navigation or a search field without pretending the old resource exists.

If you bought an expired domain

Look through the domain's history and examine the pages other websites were linking to. A link to a previous owner's article does not grant permission to republish it, and ownership of the domain does not make you the same organisation.

If a technical resource is still useful and you have the right to publish it, consider restoring it at its original address. An original replacement can also be appropriate if it answers the same need. Make the change of ownership clear wherever the former organisation's identity could cause confusion.

Test and monitor

Before launch, request the old addresses and check their response codes and final destinations. Inspect canonical URLs, internal links and the production site's indexing settings. Staging restrictions should not accidentally carry over to the public website.

After launch, examine missing page reports and server logs. Search Console can help identify indexing issues once the property is verified. Update internal links to their final addresses so visitors do not need to pass through a redirect during normal navigation.

Keep necessary redirects in place, especially where other sites still link to the old addresses. Search rankings can change during a migration, even when the technical work is sound. Monitor the pages that previously brought enquiries or other useful visits so you can investigate any unexpected losses.

Further reading

Google Search Central: Site moves with URL changes

developers.google.com ↗