Newwebs Techs logo Newwebs TechsBuilding websites, explained for beginners
Web Design

How to Design a 404 Page That Keeps Visitors on Your Site

Someone clicks an old link to your site and lands on a plain "Not Found" message with nothing else on the page. Most of those visitors hit the back button within a few seconds, and you never see them again.

A laptop screen showing a simple page not found message with a search box and a short list of links

Someone clicks an old link to your site and lands on a plain "Not Found" message with nothing else on the page. Most of those visitors hit the back button within a few seconds, and you never see them again.

Learning how to design a 404 page that keeps visitors on your site is one of the cheapest fixes you can make. It takes an hour or two, needs no extra plugins, and quietly saves traffic that would otherwise be lost every single day. This guide covers what to put on the page, what to leave off, and how to check it is working properly.

Why a 404 page matters more than you think

Every site collects broken links over time. A post gets renamed, a product is removed, someone mistypes a URL in an email, or another site links to a page that no longer exists. On a small site with 50 to 100 pages, it is normal to see dozens of 404 hits a week once you look at your logs.

A default server error page treats each of those visitors as a dead end. A designed 404 page gives them a way forward: a search box, a few useful links and a clear sense that they are still on the right site. That is the difference between losing a visitor and keeping one.

What to put on your 404 page

A good 404 page is short. It does three jobs: tells people what happened, reassures them they are in the right place, and offers a next step.

  • A plain heading. "Page not found" or "We could not find that page" is clearer than a joke. Visitors scanning quickly should understand it in one second.
  • One sentence of explanation. For example: "The link may be old, or the page may have moved."
  • Your normal header and footer. Keeping your logo, menu and footer tells people they are still on your site and gives them familiar ways out. Our piece on designing a website footer visitors use explains why the footer often does a lot of the work here.
  • A search box. If your site has more than 20 pages, a search box is the single most useful element on a 404 page.
  • Three to five links. Your most visited pages, main categories or a short list of popular posts.
  • A clear button home. One button, clearly labelled, such as "Go to the homepage".

How to design a 404 page step by step

  1. Start from your normal page template. Use the same layout, fonts and colours as the rest of the site. A 404 page that looks completely different makes visitors think they have left.
  2. Write the heading and one line of text. Keep the tone in line with the rest of the site. A friendly line is fine; a long joke is not.
  3. Add the search box near the top, just under the heading, so it is visible without scrolling on a phone.
  4. Choose your links. Check your analytics for the five most visited pages over the last three months and link to those.
  5. Add the home button below the links, with enough contrast that it stands out. The same rules from choosing a colour palette for a website apply to buttons on this page.
  6. Keep it light. Avoid large images or animations. The page should load in under a second, even on a slow connection.
  7. Test on a phone first. More than half of your visitors will likely see the 404 page on mobile.

The technical part you cannot skip

A 404 page must actually return a 404 status code to browsers and search engines. This sounds obvious, but it is one of the most common mistakes on small sites.

Some setups show a friendly "not found" message but send a 200 status code, which tells search engines the page exists. Google calls these soft 404s. They can end up indexed, waste crawl time and show up as errors in Search Console. Others redirect every missing page to the homepage, which has the same effect.

To check yours, open your browser's developer tools, go to the Network tab and load a made-up address on your site, such as yoursite/this-page-does-not-exist. The first request should show status 404. If it shows 200 or 301, ask your host or check your server settings. Most hosts and static site tools let you set a custom 404 file in a single line of configuration.

Once your page is live, the Pages report in Google Search Console will show you which missing URLs people and crawlers are hitting most, so you can fix the worst ones at the source.

Why I do not recommend a clever 404 page

Design galleries are full of creative 404 pages: interactive mini games, full-screen illustrations, long funny stories about lost astronauts. They are fun to look at, and a common piece of advice is that a memorable 404 page builds your brand.

For a small site, I think that advice usually backfires. A visitor on a 404 page is already slightly frustrated. They wanted something specific and did not get it. A big illustration pushes the search box and links below the fold on a phone, and a long joke slows them down. The best 404 pages I have tested on small sites are almost boring: a clear heading, a search box, five links. Click-through to another page is consistently higher on those than on the decorative ones.

If you want personality, put it in one short sentence. Let the useful parts carry the page.

Reduce the number of 404s in the first place

A good 404 page catches visitors who fall through. It is better still to have fewer gaps:

  • When you change a page's address, add a 301 redirect from the old URL to the new one.
  • Run a broken link check every few months. Free online tools can crawl a small site in a few minutes.
  • Look at your top 404 URLs monthly and redirect any that still get regular visits.
  • Do not delete old posts that still get traffic. Update them instead.

On a small site, these habits take about 30 minutes a month.

Frequently asked questions

What should a 404 page include?

A clear heading saying the page was not found, a short explanation, your normal header and footer, a search box, a few links to popular pages and a button back to the homepage. Keep it light so it loads quickly on any device.

Do 404 errors hurt SEO?

Normal 404 errors for pages that do not exist are not a problem in themselves. They become an issue when important pages with links pointing to them return 404, or when missing pages return a 200 code and are treated as soft 404s.

Should I redirect my 404 page to the homepage?

No. Redirecting every missing page to the homepage confuses visitors and is treated by search engines as a soft 404. Redirect only specific old URLs to their closest matching new page, and let everything else show a proper 404 page.

AH
Astrid Holm

Astrid writes about designing and looking after websites, focused on clarity, usability, and sensible upkeep.

More posts by Astrid

More in Web Design

01doorganico 084goad 3hot8 4465456 after5internprogram ahandfulofblessings ahmadpc ahomcybersecurity allodialresources annodex antiquesandperiodcollectibles aotc asianworldkashmir beedlectrics bloggertemplatefree bluefeatheragency bodyweightsolution campaign08blog carfixadvisor catstreetcollective cbstvsports cnfanspurchasing committeeof500yearsofdignityandresistance covertopsdjs cs-kaiyuangame cuestacomunicaciontotal cxoutlet dancebetgame deskgearhub destinyvillastay detectmagazine di33 diamondsteelbuildings donmo dyanadropship emarsysfinance emimattl escapechan eskitarih evautoplay everythingweddings-orlando farmzone feedviewerapp foxstudiosscratch gamevui123 gleasongrade greetingsday hacklabasu haskell iw-kaiyun jagoanproperti jilidskripsi joltbusinessfinance juegodepokergratis juegospucca kaeru-festival latestmehndidesigns lestanzediottaviano litemagazines localcommunityhero lustrsazan mariashebets menswheels nikkit ootheday oxigenvpn plurfitness prefetial probudgetcarpetcleaning psychicmrsmartin pyaten qvantor rejoignezlogis rexzbot riselayouts ruchin rwxqsgd5 sakaltime shibiaowang shop-bot skrtips spotlesshaven strcoding tetapatrium topselller uneplanteartificielle vipertechcr webtech1223411 wo-kygaming yamaha-mekar yeknava yoybuysheets zenunwa yamaha-mekar jilidskripsi ankertoto ankertoto ankertoto