unDraw for Websites
How to Build a Helpful 404 Page with an unDraw Illustration
Build a helpful 404 page with an unDraw illustration: what a good error page contains, how to choose and place artwork, and the links that help visitors recover.

Everyone who runs a website eventually sends a visitor to a page that does not exist: a mistyped address, an old bookmark, a link from another site to a post that moved. What the visitor sees next is your choice. A bare server error gives them nothing to do but leave, while a considered error page explains what happened and offers a way forward. An illustration suits this page unusually well, because the moment calls for warmth more than information. This guide shows how to build a helpful unDraw 404 page: what it must contain, how to choose and place the artwork, and how to make sure the page still returns a real 404 status, which matters more than the design.
What a good 404 page has to do
Google's Search Central documentation gives a short, practical brief for custom error pages, and it is worth treating as the specification. Tell visitors clearly that the page they are looking for cannot be found, in friendly and inviting language. Give the page the same look and feel as the rest of the site, including its navigation. Consider adding links to your most popular articles or posts, plus a link to the home page. Think about offering a way to report the broken link. And underneath all of it, the server must return an actual 404 status code.
Notice what is not on that list: jokes at the visitor's expense, a maze of every link on the site, or an automatic redirect to the homepage. Redirecting every missing address to the homepage hides the problem from the visitor and reads to search engines as a soft 404, an error page wearing a success code. A good unDraw 404 page is honest about the dead end and generous with the exits.
The anatomy of the page
Build the page in this order, because it is the order a lost visitor reads:
- A clear headline. Plain words such as "This page could not be found" beat a bare "404" and beat a pun. You can keep the number as a design element, but the sentence does the communicating.
- One line of explanation. The link may be old, the address may have a typo, the page may have moved. Say so without blaming the visitor, and without technical vocabulary.
- The illustration. Placed near the headline, it sets the tone: we know you are lost, and it is not a big deal. Selection advice is in the next section.
- A search box, if your site has search. A visitor who arrived with a goal can often reach it faster by searching than by browsing your links.
- A few hand picked links. The homepage, your most useful or most visited pages, and a contact route. Three to six links is a helpful shortlist; sixty is a sitemap wearing a costume.
- A way to report the problem. A contact link with a line such as "If you followed a link from this site to get here, please tell us" turns frustrated visitors into your quality control team.
Choosing the illustration
unDraw's library is browsable by keyword on undraw.co, and the natural search terms for this job are ideas like lost, searching, map, compass, explore, empty, and not found. Judge candidates against three criteria. First, the scene should read instantly at a glance: a character looking at a map or through a magnifying glass communicates wandering and searching without a caption. Second, it should stay light in tone; a somber or chaotic scene works against the friendly message. Third, it should fit the space beside or above your headline without dominating it, because the words and links are the functional part of this page.
Set your accent color to match the site before downloading, as you would for any other placement. Keep the file modest. An error page should be one of the fastest pages on your site, since it is often served to people on the move who just hit a problem, so prefer the SVG, or a right sized PNG if your platform requires it. The selection habits in our guide to finding the right unDraw illustration apply here too: relevance to the message first, decoration second.
Placing the artwork, with code
On a hand built site, the illustration is an ordinary image in an ordinary page, and the pattern from our guide to adding an unDraw SVG to HTML applies unchanged:
<main class="error-page">
<img src="/images/not-found.svg" alt=""
width="880" height="620" class="error-art">
<h1>This page could not be found</h1>
<p>The address may be mistyped, or the page may
have moved. Here are some good places to go next.</p>
<nav>
<a href="/">Home</a>
<a href="/guides/">Guides</a>
<a href="/contact/">Contact us</a>
</nav>
</main>
Two details in that snippet are deliberate. The alt attribute is empty, because the headline and paragraph already say everything; the character with the map is decoration, and a screen reader gains nothing from hearing it described. Our alt text guide explains that decision in full. And the image path is absolute, starting with a slash. Error pages are served at whatever wrong address the visitor typed, which may be several folders deep, so a relative path that works on your normal pages can break on the error page. The same warning applies to your stylesheets and navigation links on the 404 page: root relative paths everywhere.
In WordPress, most themes already ship a 404 template, and the work is customization rather than construction: add the illustration and your chosen links through the theme's template or a page builder, and confirm the theme is not one of the setups that quietly redirects missing pages to the homepage. The media handling from our WordPress illustration guide covers uploading the artwork.
The part that matters most: a real 404 status
A beautiful error page served with a 200 success code is a defect, not a design. Search engines treat it as a soft 404, exclude it from results, and may keep returning to a page that should not exist. Your job is to pair the custom page with the correct status:
- Static hosting. Many hosts serve a file named
404.htmlat your site root automatically. Others need one line of configuration. On Apache, an.htaccessfile withErrorDocument 404 /404.htmldoes it. On nginx, the equivalent iserror_page 404 /404.html;in the server block. - WordPress and other CMS platforms. A missing URL is answered by the platform's own error handling, which returns the correct status with the theme's template. Problems start when a plugin or setting redirects all missing pages home; avoid that pattern.
- Moved content is a different case. If the page exists at a new address, the right answer is a permanent redirect to the new location, not the error page. Reserve the 404 for addresses that are genuinely gone, and consider a 410 status for content removed deliberately and permanently.
Verify the result rather than assuming it. Type a nonsense address on your own site, open the browser's developer tools network panel, and reload: the status column should read 404 for the document. Then check that the page renders with its styles and illustration intact at that wrong address, which is where the root relative paths prove themselves.
What to avoid
- Blame and jargon. "Error 404: resource not found" tells a non technical visitor nothing. Friendly, plain language is the documented advice for a reason.
- Only a joke. Humor is welcome as seasoning, but a page that is all punchline and no links fails the visitor who needed directions.
- An automatic redirect home. It feels tidy and behaves like a soft 404, while also stranding the visitor without an explanation.
- A heavy page. Large images, custom fonts, and scripts all delay the moment a frustrated visitor can act. Keep the error page lean; the techniques in our optimization guide apply, and restraint applies more.
- Dead ends inside the error page. Test every link on it. A broken link on the page that exists for broken links is the one failure visitors remember.
Layout and tone: designing the page itself
Keep the error page visually quiet. It shares your site's header, navigation, typography, and colors, because familiarity is reassuring when something has gone wrong, and Google's guidance asks for the same look and feel as the rest of the site for exactly that reason. Within that frame, give the page one focal point: the illustration and the headline together, with generous white space around them and the link list close beneath. Resist adding the promotional sections a homepage carries. A visitor on an error page has a problem to solve, and banners competing with the solution make the page feel like it is exploiting the mistake.
Tone does the rest of the work. Write the way a good shop assistant talks when a shelf is empty: acknowledge it plainly, apologize briefly if at all, and move straight to the alternatives. One light touch of humor in the headline or the illustration caption is plenty. If your brand voice is playful everywhere else, match it; if it is formal everywhere else, a sudden comedy routine here reads as carelessness rather than charm. The illustration carries much of the warmth anyway, which is precisely why it earns its place on this page more than on most.
Find out where the broken visits come from
A good error page helps the visitor in front of you. It is also worth spending a little effort on the visitors you never see, by finding out which addresses are failing. Search Console's page indexing reporting lists URLs your site returned a 404 for, and your server logs show the same thing from the other side, including the referring page where the visitor came from. Review them occasionally and sort what you find into three piles. Links from your own pages are bugs: fix the link at its source. Old addresses for content that moved deserve a permanent redirect to the replacement, which is better for the visitor than even the best error page. And the long tail of random mistyped or invented addresses needs nothing at all; the error page handles them, and a 404 there is the correct, healthy response. What you should not do is redirect every failing address to the homepage to make the report look clean. That converts honest errors into soft 404s and strands visitors without an explanation.
Build checklist
- Headline states plainly that the page could not be found.
- One sentence explains the likely causes without blame or jargon.
- Illustration chosen for an instant lost or searching read, in the site accent color.
- Alt text empty, because the message lives in real text.
- Search box included if the site offers search.
- Three to six hand picked links, including the homepage.
- A route to report the broken link.
- All asset and link paths root relative, tested from a deep wrong address.
- Server returns a verified 404 status, checked in developer tools.
- No automatic redirect to the homepage.
Frequently asked questions
Will a custom 404 page hurt my search rankings?
No. Missing pages returning a correct 404 is normal web behavior, and Google documents that such pages are simply not indexed. What causes trouble is the soft 404 pattern, where an error is served with a success code.
Should the illustration be a link to the homepage?
It can be, but the homepage link should also exist as ordinary text, which is clearer for everyone. If the image is the link, its alt text must name the destination, which turns decoration into a functional image and complicates the page for little gain.
How often should I review the links on the page?
Whenever you restructure the site or retire popular content. The shortlist on a 404 page points at your most useful pages, and it drifts out of date quietly if nobody owns it.
Sources and further reading
- Google Search Central: troubleshoot crawling errors, including the custom 404 page tips and soft 404 guidance
- W3C Web Accessibility Initiative: Images Tutorial, for the decorative image decision
- unDraw: search the library for lost, map, and searching themed illustrations
- unDraw: the license for using the illustrations
