-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathError list
More file actions
142 lines (99 loc) · 4.42 KB
/
Copy pathError list
File metadata and controls
142 lines (99 loc) · 4.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
Got it—you want a **full list of HTTP status codes (like 404)** with meaning and when to use them. I’ll explain them in a clean, practical way 👇
---
# 🌐 HTTP Status Codes – Complete Guide
HTTP status codes are **3-digit numbers** that server sends to tell what happened with a request.
They are divided into **5 categories**:
| Range | Type | Meaning |
| ----- | ------------- | ------------------------- |
| 1xx | Informational | Request received |
| 2xx | Success | Request successful |
| 3xx | Redirection | Need to go somewhere else |
| 4xx | Client Error | User/browser mistake |
| 5xx | Server Error | Server problem |
---
# 🟢 1xx – Informational (Rarely used)
| Code | Name | Meaning |
| ---- | ------------------- | --------------------------------------- |
| 100 | Continue | Request ok, continue |
| 101 | Switching Protocols | Protocol change (e.g. HTTP → WebSocket) |
👉 Mostly developers rarely use directly.
---
# ✅ 2xx – Success Codes
| Code | Name | Use |
| ---- | ---------- | ------------------------------------ |
| 200 | OK | Everything worked (normal page load) |
| 201 | Created | New resource created (e.g. signup) |
| 202 | Accepted | Request accepted, processing later |
| 204 | No Content | Success but no response body |
---
### 📦 Example:
* Form submit → **201 Created**
* API success → **200 OK**
---
# 🔁 3xx – Redirection Codes
| Code | Name | Use |
| ---- | ------------------ | ------------------------- |
| 301 | Moved Permanently | Permanent redirect |
| 302 | Found (Temporary) | Temporary redirect |
| 303 | See Other | Redirect after POST |
| 304 | Not Modified | Cache version use karo |
| 307 | Temporary Redirect | Strict temporary redirect |
| 308 | Permanent Redirect | Strict permanent redirect |
---
### 📌 Notes:
* **301 / 308** → Permanent
* **302 / 307** → Temporary
---
# ❌ 4xx – Client Errors (User ki mistake)
| Code | Name | Meaning / Use |
| ---- | ---------------------- | ---------------------------- |
| 400 | Bad Request | Wrong request (invalid data) |
| 401 | Unauthorized | Login required |
| 403 | Forbidden | Access denied |
| 404 | Not Found | Page nahi mila |
| 405 | Method Not Allowed | Wrong method (GET/POST) |
| 408 | Request Timeout | Request slow ho gaya |
| 409 | Conflict | Data conflict |
| 410 | Gone | Permanently deleted page |
| 413 | Payload Too Large | File too big |
| 415 | Unsupported Media Type | Wrong file type |
| 429 | Too Many Requests | Rate limit exceeded |
---
### 🔥 Important ones:
* **404** → Page exist nahi karta
* **403** → Page exist karta hai, par access mana hai
* **410** → Page permanently delete ho chuka hai
---
# 💥 5xx – Server Errors (Server ki problem)
| Code | Name | Meaning |
| ---- | --------------------- | ----------------------------- |
| 500 | Internal Server Error | Generic server error |
| 501 | Not Implemented | Feature available nahi |
| 502 | Bad Gateway | Server ne galat response diya |
| 503 | Service Unavailable | Server down / busy |
| 504 | Gateway Timeout | Server response late |
---
### 📌 Real-world meaning:
* **500** → Code crash ho gaya
* **503** → Website maintenance
* **502 / 504** → Server communication issue
---
# 🧠 Easy Summary (Yaad rakhne ka shortcut)
* **200** → Sab theek ✅
* **301** → Permanent shift 🔁
* **302** → Temporary shift 🔄
* **404** → Page missing ❌
* **403** → Access denied 🚫
* **500** → Server crash 💥
---
# 🎯 Pro Tip (SEO + Dev)
* Use **301** for SEO migrations
* Use **404** for missing pages
* Use **410** if permanently removed
* Use **503** during maintenance
---
If you want, I can also give:
* 🔧 **Code examples (Node.js, PHP, .htaccess)**
* 🌍 **SEO best practices for each status code**
* 🧪 **Real debugging examples**
Just tell me 👍