Site-wide configuration

How to build a custom 404 page

When someone follows an old link to a page that is gone, a bare server error tells them nothing and they leave. A 404 page with your normal layout, a short line of explanation, and a search box turns that dead end into a way back into the site.

What it is

A 404 is the response for a URL that does not exist. A “custom” 404 is your own branded page shown in that case, instead of the host’s default white error screen.

Why it costs you

This is about keeping visitors, not ranking. Every broken inbound link, mistyped URL, or removed page lands someone on your 404. A blank error loses them; a helpful page with navigation and search keeps a share of them on the site. The one thing that must not change is the status code: the page should still return 404, so search engines know the URL is gone.

How to fix it

Build a page with your header, footer, a short human message, a search box, and links to your main sections.

  • WordPress: most themes include a 404.php template. Edit it, or add one to your theme. The status code is handled for you.
  • Shopify: edit the 404.liquid template under your theme’s templates, adding search and popular links.
  • Webflow / Squarespace / Wix: each has a dedicated 404 page setting in the designer. Style it like the rest of the site.
  • Hand-coded: create a 404 page and point your server at it (ErrorDocument 404 /404.html in Apache, error_page 404 /404.html; in Nginx), making sure the response still carries a 404 status.

How to check your site

Visit a URL you know does not exist, like yoursite.com/this-page-does-not-exist. You should see your branded page, and in the browser’s Network tab, a 404 status. If the page is blank, or if it returns 200, both need fixing.

What this looks like in practice

A store’s 404 was the host’s default error. Replacing it with a branded page carrying a search box and top-category links kept a meaningful share of mistaken-link visitors on the site instead of losing them.

Questions people ask

Should a 404 redirect to the homepage?
No. A silent redirect to the homepage returns a 200 and hides broken links from you and from Google (a “soft 404”). Show a real 404 page with a 404 status.
Does a 404 hurt SEO?
A normal 404 for a page that no longer exists is fine and expected. The problems are broken links pointing at it, or returning the wrong status code.

Does your site have this?

Check your site to see what visitors hit when a link is broken. --- ## Остальные проверки Глубина по интенту: частые/искомые проблемы — полно (с примером и 2 FAQ); узкие варианты одной темы — компактно, с кросс-ссылкой на «соседей», чтобы страницы не конкурировали друг с другом. Заметка для Этапа 3: тесно связанные id (title_*, canonical_*, h1_*) можно и слить в одну страницу с якорями — тексты ниже написаны так, что работают и по отдельности, и как секции одной страницы.

See also

All SEO checks →