404 Error का Meaning और Fix कैसे करें
Wrong paths, missing files या rewrite rules से बने page not found errors fix करें.
What a 404 means
404 Not Found means the server is working but there is no page at that address. It happens when a page is deleted or moved, a link has a typo, or the URL changed (for example after switching from /blog.php?id=12 to /blog/my-post/).
| Code | Meaning |
|---|---|
| 200 | OK – page found |
| 301 | Moved permanently – redirect to the new URL (keeps SEO value) |
| 302 | Temporary redirect |
| 404 | Not found |
| 410 | Gone – removed on purpose, will not return |
| 500 / 503 | Server error / temporarily unavailable |
Find your 404s
- Google Search Console → Indexing → Pages → “Not found (404)”.
- Hosting/cPanel → Errors or raw access logs.
- Free crawlers (Screaming Frog free version up to 500 URLs) list broken internal links.
- Search Console → Links shows external sites linking to old URLs.
Fix each 404 the right way
| Situation | Correct fix |
|---|---|
| Page moved to a new URL | 301 redirect old → new |
| Two similar pages merged | 301 from the removed one to the best matching page |
| Typo in your own link | Correct the link in your menu/content |
| Content removed for good, no replacement | Let it return 404 or 410; remove internal links |
| Old URL has many backlinks | Redirect to the closest relevant page – not blindly to the homepage |
Apache (.htaccess) examples:
Redirect 301 /old-page.html /new-page/ RewriteEngine On RewriteRule ^blog\.php$ /blog/ [R=301,L]
In WordPress use a redirection plugin; in PHP you can send header("Location: /new/", true, 301); exit;.
Avoid “soft 404s”
A soft 404 is a page that says “not found” or is nearly empty but returns status 200. Google treats it as an error and wastes crawl time. Make sure your 404 page really sends the 404 status (in PHP: http_response_code(404);) and that empty search or category pages are not indexable.
A helpful 404 page
- A clear message in simple words (and Hindi if your audience needs it).
- A search box and links to the most popular sections.
- Your normal header/footer so visitors are not lost.
- No automatic redirect to the homepage – it confuses users and Google.
404 का मतलब
404 Not Found का मतलब है server चल रहा है पर उस address पर कोई page नहीं। ऐसा तब होता है जब page delete या move हुआ, link में typo है, या URL बदल गया (जैसे /blog.php?id=12 से /blog/my-post/ पर जाने के बाद)।
| Code | अर्थ |
|---|---|
| 200 | OK – page मिला |
| 301 | स्थायी रूप से हटा – नए URL पर redirect (SEO value बचती है) |
| 302 | अस्थायी redirect |
| 404 | नहीं मिला |
| 410 | Gone – जान-बूझकर हटाया, वापस नहीं आएगा |
| 500 / 503 | Server error / अस्थायी रूप से उपलब्ध नहीं |
अपने 404s ढूँढें
- Google Search Console → Indexing → Pages → “Not found (404)”।
- Hosting/cPanel → Errors या raw access logs।
- मुफ़्त crawlers (Screaming Frog का free version 500 URLs तक) टूटे internal links list करते हैं।
- Search Console → Links पुराने URLs पर link करने वाली बाहरी sites दिखाता है।
हर 404 को सही तरीके से ठीक करें
| स्थिति | सही सुधार |
|---|---|
| Page नए URL पर गया | पुराने → नए पर 301 redirect |
| दो मिलते-जुलते pages जोड़े | हटाए गए से सबसे मेल खाते page पर 301 |
| आपके link में typo | Menu/content में link ठीक करें |
| Content हमेशा के लिए हटाया, कोई विकल्प नहीं | 404 या 410 लौटने दें; internal links हटाएँ |
| पुराने URL पर बहुत backlinks | सबसे नज़दीकी relevant page पर redirect – आँख मूँदकर homepage पर नहीं |
Apache (.htaccess) उदाहरण:
Redirect 301 /old-page.html /new-page/ RewriteEngine On RewriteRule ^blog\.php$ /blog/ [R=301,L]
WordPress में redirection plugin लें; PHP में header("Location: /new/", true, 301); exit; भेज सकते हैं।
“Soft 404s” से बचें
Soft 404 ऐसा page है जो “not found” कहता है या लगभग ख़ाली है पर status 200 देता है। Google इसे error मानता है और crawl समय बर्बाद होता है। पक्का करें कि आपका 404 page सच में 404 status भेजे (PHP में: http_response_code(404);) और ख़ाली search या category pages indexable न हों।
मददगार 404 page
- सरल शब्दों में साफ़ संदेश (audience को चाहिए तो Hindi में भी)।
- Search box और सबसे लोकप्रिय sections के links।
- सामान्य header/footer ताकि visitors भटकें नहीं।
- Homepage पर अपने-आप redirect नहीं – इससे users और Google दोनों उलझते हैं।
अक्सर पूछे जाने वाले सवाल
क्या 404 errors SEO को नुकसान पहुँचाते हैं?
हटाए pages के सामान्य संख्या में 404s site को नुकसान नहीं पहुँचाते। समस्या तब है जब ज़रूरी pages या backlinks वाले pages 404 दें – उन्हें 301 से सही विकल्प पर redirect करें।
क्या सारे 404 pages homepage पर redirect करूँ?
नहीं। Google अक्सर ऐसे redirects को soft 404 मानता है और users उलझते हैं। सिर्फ़ नज़दीकी संबंधित page पर redirect करें; वरना 404/410 लौटने दें।
404 और 410 में क्या अंतर है?
404 का मतलब नहीं मिला (शायद अस्थायी); 410 का मतलब हमेशा के लिए हटा। Google 410 URLs थोड़ा जल्दी हटा सकता है।
