# How do I set up a custom 404 page after a migration?

> You set up a custom 404 page after a migration by building a genuinely helpful not found page that returns a real 404 status code and gives stranded visitors a way forward, while understanding that the 404 page is a safety net for people, not a tool that recovers rankings. The 404 page matters because no migration redirects everything perfectly; a few old URLs will slip through without a redirect, and an old link somewhere will point at a page that no longer exists, so visitors will land on misses. A good custom 404 catches them: it shows your normal navigation, a search box, and links to popular or relevant pages, and it is clearly branded so it does not feel like a dead end. The one technical rule that must hold is that the page returns a 404 status, not a 200, because a not found page that reports success is a soft 404 that confuses search engines. So the 404 page is the complement to your redirects: redirects send known old URLs to their right homes, and the 404 page gracefully handles the unknown misses. WPBuildAI scans your site and returns the URL list, so you can redirect as many old URLs as possible and let the 404 page catch only the genuine remainder.

Source: https://wpbuildai.com/how-to-set-up-a-custom-404-page-after-migration/
By lawrence-arya · 2026-06-05

---
You set up a custom 404 page after a migration by building a genuinely helpful not found page that returns a real 404 status code and gives stranded visitors a way forward, while understanding that the 404 page is a safety net for people, not a tool that recovers rankings. The reason it matters is that no migration redirects everything perfectly. A few old URLs will slip through without a redirect, and an old link somewhere, on another site or in an email, will point at a page that no longer exists, so some visitors will land on misses. A good custom 404 catches them: it shows your normal navigation, a search box, and links to popular or relevant pages, and it is clearly branded so it does not feel like a dead end. The one technical rule that must hold is that the page returns a 404 status, not a 200, because a not found page that reports success is a soft 404 that confuses search engines. So the 404 page is the complement to your redirects: redirects send known old URLs to their right homes, and the 404 page gracefully handles the unknown misses. WPBuildAI scans your site and returns the URL list, so you can redirect as many old URLs as possible and let the 404 page catch only the genuine remainder.

A good 404 page is a fallback, not a strategy, and the gap is measurable: Seer Interactive's 2026 analysis found pages [cited in an AI Overview earning about 2.1 percent click-through while uncited pages sat at 0.9 percent](https://searchengineland.com/google-ai-overviews-ctr-recovery-study-475566), so every URL you let fall through to the 404 template is one that has left that pool entirely.

## What the 404 page is for, and what it is not

It is worth being precise about the role, because it is easy to over or under value. A custom 404 page does not recover rankings, pass link value, or make a missing page exist again; a 404 is a not found response, and dressing it up does not change that. What it does is help the human who lands on a missing URL, by giving them a clear, branded way to continue rather than a bare error that sends them away. So its value is experiential: it catches people who would otherwise bounce. Understanding this keeps your expectations right, you are improving how misses are handled, not clawing back SEO, which is the job of redirects. The 404 page and redirects work on different problems: redirects on known old URLs, the 404 page on the unavoidable unknowns.

## Why you always need one after a migration

Even a careful migration produces some 404s, which is why the page is not optional. You cannot redirect what you do not know about: a forgotten old URL, a deep page no one remembered, a link on an external site pointing at an address you did not map. Web Almanac 2024 ([HTTP Archive](https://almanac.httparchive.org/en/2024/)) is a reminder that sites have more URLs than their owners track, so some misses are almost guaranteed no matter how thorough your redirect map. Accepting that there will be a remainder is healthy: it means you plan for graceful handling rather than assuming zero misses. The combination to aim for is redirect everything you can, then catch the rest with a helpful 404, so the inevitable misses cost you a moment of a visitor's patience instead of their visit entirely.

## Make it genuinely helpful

A good custom 404 page treats the visitor as someone you still want to keep. Include your normal site navigation, so they can move anywhere from the error page. Include a search box, so they can look for what they were trying to reach, which is often the fastest path back for a missing URL. Add links to your most popular or most relevant pages, giving them an obvious next step. Keep it clearly branded and friendly, so it reads as part of your site, not a server failure. The aim is that a person who hits a missing URL has several easy ways to continue, turning a dead end into a junction. This is the difference between a default bare error and a 404 that recovers the visit, even though it cannot recover the ranking.

## The rule that must not break: return a real 404

The one place a custom 404 can go technically wrong is the status code, and it is a common, damaging mistake. The page must return an actual 404 status to the browser and to search engines, because that is what truthfully says this URL was not found, as the [HTTP status codes guidance](https://developers.google.com/search/docs/crawling-indexing/http-network-errors) describes. If the custom 404 instead returns a 200 success status, which can happen when a page is built to look like a 404 but technically reports success, search engines see a soft 404: a page claiming to exist while really being an error. That confuses indexing and can leave dead URLs lingering in the index. So however you design the page, confirm it returns a 404 status, not 200. A helpful 404 that lies about its status undermines the honesty your migration depends on.

## How it fits with your redirects

The 404 page is the second half of a pair, and the order of priority matters. First, redirect every known old URL to its real equivalent with a 301, the work described in the [site move](https://developers.google.com/search/docs/crawling-indexing/site-move-with-url-changes) and [redirects](https://developers.google.com/search/docs/crawling-indexing/301-redirects) guides, so the URLs that had a proper destination keep their value and send visitors to the right place. Do not lean on the 404 page for URLs that should have been redirected, and do not mass redirect misses to the homepage, which reads as a soft 404. The 404 page is strictly for genuine misses with no proper equivalent. For pages deliberately removed with no replacement, the status question becomes 404 versus 410, covered in [404 vs 410 for deleted pages](/404-vs-410-deleted-pages-after-migration). The custom 404 handles the accidental, unknown misses gracefully, while redirects handle everything with a known home.

## Watch the 404 report and keep redirecting

A custom 404 is not the end of the work; it is the safety net while you keep reducing the misses. After launch, watch your 404 report, in Search Console and your analytics, to see which missing URLs people and crawlers are actually hitting, the same monitoring as [fixing 404 errors in Search Console](/google-search-console-404-errors-after-website-redesign). When you find a missing URL that does have a real equivalent, add a 301 for it, moving it out of the 404 bucket. Over time this shrinks the genuine misses to the ones that truly have no home, which the 404 page handles. So the 404 page buys you graceful handling immediately, while the report lets you keep converting accidental 404s into proper redirects, including fixing internal links that point at missing pages, as in [fixing broken links after a migration](/fix-broken-links-wordpress-after-migration).

## Steps to set up a custom 404 after a migration

1. **Build a branded 404 page** with navigation, a search box, and popular links.
2. **Confirm it returns a real 404 status**, not a 200.
3. **Redirect every known old URL** with a 301 so few misses remain.
4. **Do not blanket redirect misses** to the homepage or rely on the 404 for real equivalents.
5. **Watch the 404 report** after launch for URLs people actually hit.
6. **Add 301s** for missed URLs that have a real equivalent, shrinking the remainder.

## Worked example: a graceful safety net

Imagine a site that migrates and, despite a thorough redirect map, still has a handful of old URLs slip through and some external links pointing at long forgotten pages. The team builds a custom 404 page with the full navigation, a prominent search box, and links to the most popular articles, clearly styled like the rest of the site, and they verify it returns a real 404 status rather than a 200. They have already redirected every known old URL, so the 404 page only catches genuine misses. After launch they watch the 404 report, spot a cluster of hits on an old URL that actually has a new equivalent, and add a 301 for it, moving it out of the misses. The remaining 404s are pages that truly no longer exist, and visitors who hit them get a helpful junction instead of a dead end. The page recovered visits, while the redirects recovered the rankings.

## Limitation: a 404 page is for people, not rankings

It is essential to keep the boundary clear. A custom 404 page improves the experience of hitting a missing URL; it does not recover the ranking or the value of the page that is gone, because a 404 is by definition a not found response. So building a beautiful 404 page is not a substitute for redirects, and it cannot rescue the SEO of pages you failed to redirect. If a page had a real equivalent, it deserves a 301, not a 404 page, no matter how good that page is. Treat the 404 page as the graceful handler of genuine, unavoidable misses, and keep the actual ranking protection where it belongs, in a complete redirect map. The page catches people; the redirects keep your search presence.

## Common mistakes

- Building a 404 page that returns a 200 status, creating soft 404s.
- Relying on the 404 page for URLs that had a real equivalent to redirect.
- Mass redirecting misses to the homepage instead of returning an honest 404.
- Shipping a bare default error with no navigation, search, or links.
- Never watching the 404 report to convert accidental misses into redirects.

## Key points

You set up a custom 404 page after a migration by making it genuinely helpful, with navigation, a search box, and links to popular pages, clearly branded, and by ensuring it returns a real 404 status rather than a 200, which would make it a soft 404. The page is a safety net for people, not a ranking tool: it catches the inevitable misses that redirects do not cover, but it does not recover rankings or value. So redirect every known old URL with a 301 first, never blanket redirect misses to the homepage, and let the 404 page handle only genuine misses with no equivalent. Watch the 404 report after launch and keep converting accidental misses into proper redirects, shrinking the remainder over time. The 404 page recovers visits; your redirect map recovers rankings. WPBuildAI scans your site and returns the URL list, so you can redirect as many old URLs as possible and let the 404 page catch only the genuine remainder. Send your web address for a free analysis.

Not affiliated with WordPress, Lovable, Webflow, Shopify, Wix, or Squarespace.