What HTTP status codes should you know about common servers?

Simple 2021-04-07 20:38:44
http status codes know common



Status code : Message class (1 initial )

Temporary response : A status code that temporarily responds and requires the requester to continue the operation

  • 100 [ continue ] The requester shall continue to make the request
    • The server returns this code to indicate that the first part of the request has been received , Waiting for the rest
  • 101 [ Handover protocol ] Requestor has requested server to switch protocol , The server has confirmed and is ready to switch
    • Similar measures should only be taken when switching over new agreements is more beneficial
  • 102 Processing from WebDAV(RFC 2518) Extended status code ,
    • Representative processing will be continued

Status code : Success class (2 initial )

success : Indicates that the request's status code has been processed successfully

  • 200 [ success ] The server has successfully processed the request
    • Indicates that the server provided the requested web page
    • If it's for you robots.txt The file displays this status code , said Googlebot The file has been retrieved successfully
  • 201 [ Created ] The request succeeded and the server created a new resource
  • 202 [ Accepted ] Request accepted by server , But not yet processed
  • 203 [ Unauthorized information ] The server has successfully processed the request , But the information returned may come from another source
  • 204 [ There is no content ] The server successfully processed the request , But nothing is returned
  • 205 [ Reset Content ] The server successfully processed the request , But nothing is returned
    • And 204 Different response , This response requires the requester to reset the document view
    • for example : Clear form content to enter new content
  • 206 [ Created ] Server successfully processed part GET request

Status code : Redirection class (3 initial )

To complete the request , Need further operation : Usually , These status codes are used to redirect

Google It is recommended that you use no more than 5 Time . You can use webmaster tools to check Googlebot Is there any problem in crawling the redirected web page . The network crawling page under the diagnosis lists the errors caused by redirection Googlebot Unable to grab URL .

  • 300 [ Multiple choice ] Request for , The server can perform many operations
    • The server can (user agent) Select an action , Or provide a list of actions for the requester to select
  • 301 [ A permanent move ] The requested page has been permanently moved to a new location
    • The server returned this response ( Yes GET or HEAD Response to the request ) when , The requester is automatically moved to a new location
    • You should use this code to tell a web page or website that it has been permanently moved to a new location
  • 302 [ Temporary movement ] The server is currently responding to requests from pages in different locations , But the requester should continue to use the original location to respond to future requests
    • This code and response GET and HEAD Requested 301 Code similarity , Will automatically move the requester to a different location
    • You should not use this code to tell a page or website that it has moved , because Googlebot Will continue to grab the original location and index
  • 303 [ View other locations ] The requester should use separate GET When requesting to retrieve a response , The server returns this code
    • For addition HEAD All requests except , The server will automatically go to another location
  • 304 [ not changed ] Since last request , The requested page has not been modified , When the server returns this response , Page content will not be returned
    • If the page has not changed since the requester last requested , You should configure the server to return this response ( be called If-Modified-Since HTTP header )
    • The server can tell Googlebot The page hasn't changed since the last time it was crawled , And save bandwidth and overhead
  • 305 [ Using agents ] The requester can only use a proxy to access the requested web page
    • If the server returns this response , Also indicates that the requester should use a proxy
  • 307 [ Temporary redirection ] The server is currently responding to requests from pages in different locations , But the requester should continue to use the original location to respond to future requests
    • This code and response GET and HEAD Requested 301 Code similarity , Will automatically move the requester to a different location
    • You should not use this code to tell Googlebot A page or website has moved , because Googlebot Will continue to grab the original location and index

Status code : Request error class (4 initial )

Request error : These status codes indicate that the request may be in error , Hinders server processing

  • 400 [ Wrong request ] The server does not understand the syntax of the request
  • 401 [ unauthorized ] Request for authentication
    • For the web page requested after login , The server may return this response
  • 403 [ prohibit ] Server rejects request
    • If you are in Googlebot See this status code when trying to grab a valid page on your website , You can go to Google Webmaster tool diagnosis under the network crawl page to see this information
    • Maybe your server or host rejected Googlebot visit .
  • 404 [ Not found ] The server could not find the requested page , This code is often returned for pages that do not exist on the server
    • If you don't have robots.txt file , And you are Google Webmaster Tools " The diagnosis " Labeled robots.txt Page to see this status code , Then this is the correct status code
    • If you have robots.txt File and see this status code , That means your robots.txt The file may be named incorrectly or in the wrong location ( The file should be in the top-level domain , be known as robots.txt)
    • If for Googlebot Grab the URL to see this status code ( stay " The diagnosis " Labeled HTTP On the error page ), said Googlebot It may follow an invalid link to another page ( It's the old link or the wrong link )
  • 405 [ Method disable ] Disable the method specified in the request
  • 406 [ Don't accept ] Unable to respond to the requested page using the requested content attribute
  • 407 [ Proxy authorization required ] This status code and 401( unauthorized ) similar , However, the designated requester shall authorize the use of the agent
    • If the server returns this response , It also means that the requester should use a proxy
  • 408 [ request timeout ] Server timed out waiting for request
  • 409 [ Conflict ] Server conflicts when completing request
    • The server must include information about the conflict in the response
    • The server is responding to a conflict with the previous request PUT This code may be returned on request , And a list of the differences between the two requests
  • 410 [ deleted ] If the requested resource has been permanently deleted , The server will return this response
    • The code is associated with 404( Not found ) Code similarity , But in the case of resources that existed before and don't exist now , Sometimes it's used instead of 404 Code
    • If the resource has been permanently moved , You should use 301 Specify the new location of the resource
  • 411 [ Effective length required ] The server does not accept requests without a valid content length header field
  • 412 [ Preconditions not met ] The server does not meet one of the prerequisites set by the requester in the request
  • 413 [ Request entity too large ] The server was unable to process the request , Because the request entity is too large , Beyond the processing power of the server
  • 414 [ Requested URI Too long ) Requested URI( Usually web address ] Too long , Server cannot process
  • 415 [ ( Unsupported media types ] The requested format is not supported by the requested page
  • 416 [ The request scope does not meet the requirements ] If the page cannot provide the requested scope , Then the server will return this status code
  • 417 [ Not meeting expectations ] Server not satisfied " expect " Request header field requirements

Status code : Server error class (5 initial )

Server error : These status codes indicate that an internal error occurred while the server was processing the request . These errors may be from the server itself , Instead of requesting an error

  • 500 [ Server internal error ] Server encountered an error , Unable to complete request
  • 501 [ Not yet implemented ] The server does not have the function to complete the request
    • This code may be returned when the server does not recognize the request method
  • 502 [ Bad Gateway ] Server as gateway or proxy , Invalid response received from upstream server
  • 503 [ Service not available ] The server is currently unavailable ( Maintenance due to overload or shutdown )
    • Usually , It's just a temporary situation
  • 504 [ gateway timeout ] Server as gateway or proxy , But the request was not received from the upstream server in time
  • 505 [ HTTP Version not supported ] The server does not support the HTTP Protocol version
版权声明
本文为[Simple]所创,转载请带上原文链接,感谢
https://qdmana.com/2021/04/20210407203258854n.html

  1. VSLAM front end: image feature extraction
  2. Exclusive dialogue with the person in charge of Alibaba cloud function computing: what you don't know about serverless
  3. 「开源免费」基于Vue和Quasar的前端SPA项目crudapi后台管理系统实战之序列号自定义组件(四)
  4. "Open source and free" serial number customization component of crudapi background management system of front end spa project based on Vue and Quasar (4)
  5. JavaScript 相似度排序
  6. Springboot项目搭建(前端到数据库,超详细)
  7. Less than 150 lines of code to write a python version of the snake
  8. 02_Nginx部署服务
  9. vue 快速入门 系列 —— vue 的基础应用(上)
  10. JavaScript similarity ranking
  11. 基于Vue和Quasar的前端SPA项目crudapi后台管理系统实战之布局菜单嵌套路由(三)
  12. Springboot project construction (front end to database, super detailed)
  13. 02_ Nginx Deployment Services
  14. vue 快速入门 系列 —— vue 的基础应用(上)
  15. Vue quick start series basic application of Vue
  16. Layout menu nested routing of front end spa project crudapi background management system based on Vue and Quasar (3)
  17. Vue quick start series basic application of Vue
  18. 一个好用的Visual Studio Code扩展 - Live Server,适用于前端小工具开发
  19. 基于Vue和Quasar的前端SPA项目实战之用户登录(二)
  20. css常用选择器总结
  21. Behind the miracle of the sixth championship is the football with AI blessing in the Bundesliga
  22. An easy to use Visual Studio code extension - live server, suitable for front-end gadget development
  23. 用 Python 抓取公号文章保存成 HTML
  24. User login of front end spa project based on Vue and Quasar (2)
  25. Summary of common selectors in CSS
  26. Using Python to grab articles with public number and save them as HTML
  27. To "restless" you
  28. 【免费开源】基于Vue和Quasar的crudapi前端SPA项目实战—环境搭建 (一)
  29. 【微信小程序】引入阿里巴巴图标库iconfont
  30. layui表格点击排序按钮后,表格绑定事件失效解决方法
  31. Unity解析和显示/播放GIF图片,支持http url,支持本地file://,支持暂停、继续播放
  32. 【vue】 export、export default、import的用法和区别
  33. [free and open source] crudapi front end spa project based on Vue and Quasar
  34. [wechat applet] introduces Alibaba icon library iconfont
  35. Layui table click Sort button, table binding event failure solution
  36. Element树形控件Tree踩坑:修改current-node-key无效
  37. Unity parses and displays / plays GIF images, supports HTTP URL, supports local file: / /, supports pause and resume playback
  38. Element树形控件Tree踩坑:修改current-node-key无效
  39. The usage and difference of export, export default and import
  40. Element tree control: invalid to modify current node key
  41. Element tree control: invalid to modify current node key
  42. linux下安装apache(httpd-2.4.3版本)各种坑
  43. How to install Apache (httpd-2.4.3) under Linux
  44. 程序员业余时间写的代码也算公司的?Nginx之父被捕引发争议
  45. Nacos serialize for class [com.alibaba.nacos.common.http.HttpRestResult] failed.
  46. Do programmers write code in their spare time? Controversy over the arrest of nginx's father
  47. Nacos serialize for class [ com.alibaba.nacos . common.http.HttpRestResult ] failed.
  48. Seamless management of API documents using eolink and gitlab
  49. vue 的基础应用(上)
  50. 28岁开始零基础学前端,这些血的教训你一定要避免
  51. Basic application of Vue
  52. Starting at the age of 28, you must avoid these bloody lessons
  53. Ubuntu 16.04 can not connect to the wireless solution and QQ installation
  54. Industry security experts talk about the rapid development of digital economy, how to guarantee the security of data elements?
  55. 利用Vue实现一个简单的购物车功能
  56. Behind the "tireless classroom" and teacher training, can byte education really "work wonders"?
  57. Using Vue to realize a simple shopping cart function
  58. 【css】伪类和伪类元素的区别
  59. 【css效果】实现简单的下拉菜单
  60. 【vue】父子组件传值