LinkedIn에서 Google 검색 확인하기:
LinkedIn에서 팔로우하고 검색 가능한 사이트를 만드는 방법에 관한 Google 검색 뉴스와 리소스를 확인하세요.
网站管理员中心404代码专题周
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
2008年8月20日星期三
发表者:
Maile Ohye
, 开发者项目技术带头人
原文:
It's 404 week at Webmaster Central
发表于:2008年8月11日星期一,下午1:40
近期我们将发表一系列博客,帮助您正确使用
404
响应代码。
响应代码是网络服务器在响应一个
URL
的浏览请求时返回的数字形式的状态代码(比如
200
代表“成功”,
301
代表“永久移动”)。如果请求的某一文件“无法找到”,那么服务器端将返回一个
404
响应代码。
当用户对您的网页发送请求时,您的服务器就会搜索这个
URL
所对应的文件。如果这个文件存在,您的服务器就会返回一个
200
状态代码以及相应信息(通常就是这个网页的内容,比如该页的
HTML
代码)。
那么什么是
404
呢?以图示中的指向“
Visit Google Apps”
的链接为例,由于在进行编码时出现了拼写错误,这个链接失效了。如果有用户点击”
Visit Google Apps”
,这个特定的网页(文件)无法被服务器正确定位。这时,服务器将会返回一个
404
响应代码,表示“无法找到”。
现在我们了解了
404
代码的基本知识,欢迎您继续关注近期即将推出的更多关于“如何使用对用户和搜索引擎都友好的
404
代码”的相关文章,包括:
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2008-08-01。
[null,null,["最后更新时间 (UTC):2008-08-01。"],[[["\u003cp\u003eThis series of blog posts focuses on the \u003ccode\u003e404\u003c/code\u003e response code, which indicates a "Not Found" error when a webserver cannot locate the requested webpage/file.\u003c/p\u003e\n"],["\u003cp\u003eUnderstanding response codes, like the common \u003ccode\u003e200\u003c/code\u003e for "OK" or \u003ccode\u003e301\u003c/code\u003e for "Moved Permanently," is important as they represent the webserver's status in response to a request.\u003c/p\u003e\n"],["\u003cp\u003eA \u003ccode\u003e404\u003c/code\u003e error occurs when a user clicks a link, but the linked webpage/file is missing or inaccessible due to issues like a broken or mistyped URL.\u003c/p\u003e\n"],["\u003cp\u003eThe upcoming posts will provide guidance on optimizing the user experience and search engine handling of \u003ccode\u003e404\u003c/code\u003e errors.\u003c/p\u003e\n"]]],["Webservers use numeric response codes to indicate the status of a URL request. A `404` code signifies that a requested file was \"Not Found.\" When a user requests a webpage, the server searches for the corresponding file. If the file isn't found, the server should return a `404` error. Future posts will discuss optimizing `404` errors for both users and search engines. Response codes such as `200` means the file is found and `301` means the file has been permanently moved.\n"],null,["# It's 404 week at Webmaster Central\n\nMonday, August 11, 2008\n\n\nThis week we're publishing several blog posts dedicated to helping you with one response code:\n`404`.\n[Response codes](https://wikipedia.org/wiki/List_of_HTTP_status_codes)\nare a numeric status (like `200` for \"OK\", `301` for \"Moved Permanently\")\nthat a webserver returns in response to a request for a URL. The `404` response code\nshould be returned for a file \"Not Found\".\n\n\nWhen a user sends a request for your webpage, your webserver looks for the corresponding file for\nthe URL. If a file exists, your webserver likely responds with a `200` response code\nalong with a message (often the content of the page, such as the HTML).\n\n\nSo what's a `404`? Let's say that in the link to \"Visit Google Apps\" above, the link is\nbroken because of a typing error when coding the page. Now when a user clicks \"Visit Google Apps\",\nthe particular webpage/file isn't located by the webserver. The webserver should return a\n`404` response code, meaning \"Not Found\".\n\n\nNow that we're all on board with the basics of `404` errors, stay tuned for even more\ninformation on making `404` errors good for users and for search engines.\n\nWritten by [Maile Ohye](/search/blog/authors/maile-ohye), Developer Programs Tech Lead"]]