Custom 404 Error Page Generator
Pick which error pages you need, write the wording, add search and links, choose an illustration and colours, and download the files with setup snippets.
ทำงานในเบราว์เซอร์ของคุณ ไฟล์ไม่ออกจากอุปกรณ์ ดูวิธีตรวจสอบ
…
วิธีทำ
- 1Choose the pages
Tick 404, 500, 403 and 503 as needed, then pick the page to edit.
- 2Write the wording
Edit the heading and message for each page, or restore the defaults.
- 3Add search and links
Pick the search option and list a few helpful links with root paths.
- 4Design the pages
Choose illustration, accent, background, text colour, rounding, dark mode and inline CSS.
- 5Download the files
Download the ZIP with the HTML pages and the shared stylesheet.
- 6Configure your server
Copy the Nginx, Apache, Express or static host instructions and test with a missing URL.
เกี่ยวกับเครื่องมือนี้
When a visitor follows a broken link to your site, the default server error page is a dead end: a grey line of text, no navigation and no way forward. A good 404 page admits the page is missing, keeps your branding, offers a search box and a few useful links, and gets people back to the content they wanted. Server errors need different words: a 500 page should say the problem is on your side and suggest trying again, a 403 page should explain the lack of access, and a 503 page should say the outage is temporary. This generator makes all four from one design. Tick the pages you need, then edit the heading and message for each, or keep the tested defaults. The 404 page can include a search box that sends visitors to your own search page with your query parameter, or to DuckDuckGo or Google limited to your domain. Helpful links show on the 404 and 403 pages, and every page gets a home button, an optional go back button and, for server errors, a try again button. Pick a simple inline SVG illustration (a compass, an unplugged cable, a broken cloud or the error number itself) drawn in your accent colour, set background, text colour and corner rounding, and decide whether the pages follow the visitor's dark mode. Pages can share one stylesheet or carry their CSS inside, which is safer for 500 and 503 pages because they then need nothing else from a struggling server.
Wiring the pages up
Static hosts such as Netlify, Cloudflare Pages, GitHub Pages and Vercel pick up a 404.html in the root of your site automatically. On your own server, use the snippet for Nginx (error_page lines plus an internal location), Apache (ErrorDocument lines in .htaccess) or Express (a 404 handler after your routes and an error handler that sends 500.html). Next.js users copy the markup into not-found and error components.
Avoid soft 404s
The page must still be sent with its real status code. A missing page that returns 200 with error wording is a soft 404, which search engines report and may index. Every generated page also carries a noindex robots tag as a second safety net. Links are written as root paths so they work at any URL depth.
Limits
These are static pages: they cannot log the broken link, suggest the closest real page or show live system status. They do not set the HTTP status by themselves; your server or host does that. The search box needs a search page or an outside search engine, and the Google option uses a tiny inline script to add site: to the query. Settings are saved only in this browser.
ตัวอย่างพร้อมวิธีทำ
An online shop picks 404 and 500 pages, the compass illustration, accent #2563eb, its own search at /search with parameter q and four links (Home, Shop all products, Help centre, Contact us). The 404 page title reads Page not found | Example Shop, its form sends to /search?q=..., and the links point to /products, /help and /contact. The ZIP holds 404.html, 500.html and error-pages.css, and the Nginx snippet starts with error_page 404 /404.html; and error_page 500 /500.html;.
สรุปสั้น ๆ
- หมวดหมู่: นักพัฒนาและข้อมูล
- ทำงานในเบราว์เซอร์ ไม่ต้องสมัคร ไม่ต้องอัปโหลด
- ข้อมูลที่คุณกรอกอยู่บนอุปกรณ์ของคุณ
- มีภาษาอังกฤษ
- ตรวจสอบเนื้อหาล่าสุด:
- แหล่งข้อมูลทางการ: Google Search Central: Soft 404 errors and creating useful 404 pages
คำถามที่พบบ่อย
Where do I put the 404.html file?
On static hosts such as Netlify, Cloudflare Pages, GitHub Pages and Vercel, put it in the root of the folder you publish and it is used automatically. On Nginx or Apache, upload it to the web root and add the config lines shown under Make your server use them.
Why are my relative links changed to start with a slash?
A 404 page is shown at whatever address the visitor typed, such as /blog/2019/old-post. A relative link like help would then point to /blog/2019/help, which is also missing. Root links such as /help work from any depth, so the tool writes them that way and tells you when it changed one.
Should the 500 page use the shared CSS file?
Inline CSS is safer for 500 and 503 pages, because when the server is failing it may not deliver a second file either. Tick CSS inside each page to build every page as one self-contained file.
How does the search box work?
With your own search, the form sends the visitor to your search page with the query in the parameter you name, usually q. With DuckDuckGo, it adds your domain as the site filter. With Google, a short inline script adds site:yourdomain.com before the words when the form is sent.
What is a soft 404?
It is a page that says not found but returns status 200, as if everything were fine. Search engines treat it as an error in their reports and may keep it in results. Make sure your server or host sends status 404 with the custom page, not 200.
Do the pages work in dark mode?
Yes, if you tick Follow the visitor's dark mode: the stylesheet adds a prefers-color-scheme rule that switches to a dark background and light text when the visitor's device is in dark mode. The illustration and buttons keep your accent colour.
