<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title><![CDATA[SEO(搜索引擎优化)技术 - 商业SEO服务 - 郝聪SEO博客]]></title> 
<link>http://www.bloghuman.com/index.php</link> 
<description><![CDATA[搜索引擎优化(SEO)、搜索引擎营销(SEM)、网络营销；商业SEO服务：关键词排名优化、整体网站优化、SEO顾问咨询、企业SEO培训]]></description> 
<language>zh-cn</language> 
<copyright><![CDATA[SEO(搜索引擎优化)技术 - 商业SEO服务 - 郝聪SEO博客]]></copyright>
<item>
<link>http://www.bloghuman.com/post/227/</link>
<title><![CDATA[404错误的处理方式及对SEO的影响(更新)]]></title> 
<author>黑色梦中 &lt;haocong81@gmail.com&gt;</author>
<category><![CDATA[SEO技术]]></category>
<pubDate>Fri, 17 Nov 2006 12:08:14 +0000</pubDate> 
<guid>http://www.bloghuman.com/post/227/</guid> 
<description>
<![CDATA[ 
	　　在“<a href="http://www.bloghuman.com/post/135/" target="_blank">通过HTTP状态码查看搜索引擎蜘蛛如何爬行你的网站</a>”一文中，我介绍了一些经常涉及到的HTTP状态码及含义，譬如大家经常探讨并且与本文相关的Http状态码：<br/><div class="code"><br/>404：服务器找不到指定的资源，请求的网页不存在(譬如浏览器请求的网页被删除或者移位，但不排除日后该链接有效的可能性)；<br/>410：请求的网页不存在(注意：410表示永久性，而404表示临时性)；<br/>200：服务器成功返回请求的网页；<br/>301：网址永久性重定向<br/>302：网址临时性重定向<br/></div><br/>注意：大部分搜索引擎将“404”与“410”状态同等对待，如Google。(参见<a href="http://www.mattcutts.com/blog/sitemaps-interview/" target="_blank">Matt Cutts的说明)</a><br/><br/><span style="font-size: 14px;"><strong>对HTTP404状态码的理解</strong></span><br/><br/>　　HTTP 404 错误意味着链接指向的网页不存在，即原始网页的URL失效，这种情况经常会发生，很难避免，比如说：网页URL生成规则改变、网页文件更名或移动位置、导入链接拼写错误等，导致原来的URL地址无法访问；当Web 服务器接到类似请求时，会返回一个404 状态码，告诉浏览器要请求的资源并不存在。但是，Web服务器默认的404错误页面，无论Apache还是IIS，均十分简陋、呆板且对用户不友好，无法给用户提供必要的信息以获取更多线索，无疑这会造成用户的流失。<br/><br/>　　因此，很多网站均使用自定义404错误的方式以提供用户体验避免用户流失。一般而言，自定义404页面通用的做法是在页面中放置网站快速导航链接、搜索框以及网站提供的特色服务，这样可以有效的帮助用户访问站点并获取需要的信息。<br/><br/><br/><span style="font-size: 14px;"><strong>HTTP404对<a href="http://www.bloghuman.com" target="_blank" title="http://www.bloghuman.com" class="mykeyword">SEO</a>的影响</strong></span><br/><br/>　　自定义404错误页面是提供用户体验的很好的做法，但在应用过程中往往并未注意到对搜索引擎的影响，譬如：错误的服务器端配置导致返回“200”状态码或自定义404错误页面使用Meta Refresh导致返回“302”状态码。正确设置的自定义404错误页面，不仅应当能够正确地显示，同时，应该返回“404”错误代码，而不是“200”或“302”。虽然对访问的用户而言，HTTP状态码究竟是“404”还是“200”来说并没有什么区别，但对搜索引擎而言，这则是相当重要的。<br/><br/><span style="font-size: 12px;"><strong>(一)自定义404错误页返回“200”状态码</strong></span><br/><br/>　　当搜索引擎蜘蛛在请求某个URL时得到“404”状态回应时，即知道该URL已经失效，便不再索引该网页，并向数据中心反馈将该URL表示的网页从索引数据库中删除，当然，删除过程有可能需要很长时间；而当搜索引擎得到“200”状态回应时，则会认为该url是有效的，便会去索引，并会将其收录到索引数据库，这样的结果便是这两个不同的url具有完全相同的内容：自定义404错误页面的内容，这会导致出现复制网页问题。对搜索引擎而言，特别是Google，不但很难获得<a href="http://www.bloghuman.com/tag.php?tag=trustrank" target="_blank">信任指数TrustRank</a>，也会大大降低Google对网站质量的评定。（为什么会出现返回“200”状态码的情况？？请参看下面内容“自定义404错误页面的基本原则”）<br/><br/>　　我一直在使用Google Sitemap，当我们提交XML格式网站地图文件时，Google会验证我们的身份以确保是网站合法的管理者。验证方式有两种：上传指定名称的html页到网站根目录或者在网页meta区域添加一个标识身份的meta标签。我通常是使用上传html网页的方式，但Google却提示我网站根目录下找不到这个网页（实际上我已上传，并且通过浏览器可以访问），这是一个很可怕的问题，见图：<br/><br/><a href="http://www.bloghuman.com/attachment/http-statuscode-404-and-200.gif" target="_blank"><img src="http://www.bloghuman.com/attachment/http-statuscode-404-and-200.gif" class="insertimage" alt="点击在新窗口中浏览此图片" title="点击在新窗口中浏览此图片" border="0"/></a><br/><br/><span style="font-size: 12px;"><strong>(二)自定义404错误页使用Meta Refresh返回“302”状态码</strong></span><br/><br/>　　常常看到许多网站的自定义404错误页面采取类似这样的形式：首先显示一段错误信息，然后，通过Meta Refresh将页面跳转到网站首页、网页地图或其他类似页。根据具体实现方式不同，这类404页面可能返回“200”状态码，也可能返回“302”，但不论哪种，从SEO技术角度看，均不是一种合适的选择。<br/><br/>　　对“200”状态的情况我们上面已经谈过，那么，当404页面返回“302”时，搜索引擎会怎么对待呢？从理论上说，对“302”错误，搜索引擎认为该网页是存在的，只不过临时改变了地址，仍然会索引收录该页，这样，同样会出现类似于“200”状态码时的重复文本问题；其次，以google为代表的主流搜索引擎对302重定向的适用范围要求越来越严格，这类不当使用302重定向的情况存在很大的风险。<br/><br/><br/><span style="font-size: 14px;"><strong>确保自定义404错误页面能够返回“404”状态码</strong></span><br/><br/>　　在自定义404错误页面设置完毕后，一定要检查一下其是不是能够正确地返回“404”状态码。可以使用<a href="http://www.seoconsultants.com/tools/headers.asp" target="_blank">Server Header检查工具</a>，输入一个不存在网页的url，查看一下HTTP Header的返回情况，确信其返回的是“404 Not found”。 <br/><br/><br/><span style="font-size: 14px;"><strong>404错误的处理方式</strong></span><br/><span style="font-size: 12px;"><strong>(一)定制404错误页面的基本原则</strong></span><br/><br/>　　<strong>首先应明确的是，404错误应工作在服务器级而不是网页级</strong>。对定制使用动态页面如PHP脚本类型的404页时，必须确保在PHP执行前服务器已经顺利地送出“404”状态码，不然，一旦执行到了ISAPI级别，返回的状态码便只能是“200”或其他如“302”之类的重定向状态码了。<br/><br/>　　<strong>其次，在自定义网站的404错误页面时，对设置的错误页面URL链接应使用相对路径而不是绝对路径，而且自定义404页面应该放在网站根目录下</strong>。尽管无效链接可能是多种形式的URL，但当发生404访问错误时，WEB服务器会自动将其转到自定义的当404错误页中，这跟URL的形似没有关系。<br/><br/><span style="font-size: 12px;"><strong>(二)Apache下设置404错误页面</strong></span><br/><br/>　　为Apache Server设置 404错误页面的方法很简单，只需在.htaccess 文件中加入如下内容即可：<br/><div class="code">ErrorDocument 404 /notfound.php</div><br/><br/><span style="color: #FF0000;">注意：<br/>1.切记不要将404错误转向到网站主页，否则可能会导致主页在搜索引擎中消失<br/>2.切记不要使用绝对URL(例如：http://www.bloghuman.com/nofound.php形式)，如果使用绝对URL返回的状态码是“302”+“200”（已测试）<br/></span><br/><br/><span style="font-size: 12px;"><strong>(三)IIS/ASP.net下设置404错误页面</strong></span><br/><br/>首先，修改应用程序根目录的设置，打开 “web.config” 文件编辑，在其中加入如下内容：<br/><div class="code"><br/>＜configuration＞<br/>＜system.web＞<br/>＜customErrors mode=”On” defaultRedirect=”error.asp”＞<br/>＜error statusCode=”404″ redirect=”notfound.asp” /＞<br/>＜/customErrors＞<br/>＜/system.web＞<br/>＜/configuration＞<br/></div><br/><br/>注：上文例中“error.asp”为系统默认的404页面，“notfound.asp”为自定义的404页面，使用时请修改相应文件名。<br/><br/>然后，在自定义的404页面“notfound.asp”中加入：<br/><br/><div class="code"><br/>＜%<br/>Response.Status = “404 Not Found”<br/>%＞<br/></div><br/><br/>这样，便可以保证IIS能够正确地返回“404”状态码<br/><br/><span style="font-size: 12px;"><strong>(四)在IIS/ASP.net下设置404静态页面</strong></span><br/><br/>设置静态404错误页面的方法则比较简单，在IIS管理器中右键单击要管理的网站，打开“属性”中的“自定义错误信息”页，为“404”设定相应的错误信息页即可。不过，此处在“消息类型”中一定要选择“文件”或“默认值”，而不要选择“URL”，不然，将导致返回“200”状态码。<br/><br/><div class="quote"><div class="quote-title">引用</div><div class="quote-content">作者: 郝聪<br/>原载: <a href="http://www.bloghuman.com" target="_blank">黑色梦中<a href="http://www.bloghuman.com" target="_blank" title="http://www.bloghuman.com" class="mykeyword">SEO博客</a></a><br/>版权所有,转载时请注明作者并以链接形式标注原始出处!</div></div><br/>Tags - <a href="http://www.bloghuman.com/tags/http%25E7%258A%25B6%25E6%2580%2581%25E7%25A0%2581/" rel="tag">http状态码</a> , <a href="http://www.bloghuman.com/tags/404/" rel="tag">404</a> , <a href="http://www.bloghuman.com/tags/seo/" rel="tag">seo</a> , <a href="http://www.bloghuman.com/tags/301%25E9%2587%258D%25E5%25AE%259A%25E5%2590%2591/" rel="tag">301重定向</a> , <a href="http://www.bloghuman.com/tags/sitemap/" rel="tag">sitemap</a> , <a href="http://www.bloghuman.com/tags/google/" rel="tag">google</a>
]]>
</description>
</item><item>
<link>http://www.bloghuman.com/post/227/#blogcomment74856</link>
<title><![CDATA[[评论] 404错误的处理方式及对SEO的影响(更新)]]></title> 
<author>xiao5479 &lt;user@domain.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Fri, 05 Jan 2007 02:06:37 +0000</pubDate> 
<guid>http://www.bloghuman.com/post/227/#blogcomment74856</guid> 
<description>
<![CDATA[ 
	博主。我的网站碰到了和你一样的google验证问题，也是提示我网站根目录下找不到这个网页（实际上我已上传，并且通过浏览器可以访问）。<br/>看完本文，我仍然不知道该怎么去做。还有google很快就搜录了我的网站，但百度去一直没有。这与服务器有没关系呢，还有一个情况，我的网站是电信线，网通很慢这和搜索引擎搜录有没关系。
]]>
</description>
</item><item>
<link>http://www.bloghuman.com/post/227/#blogcomment76555</link>
<title><![CDATA[[评论] 404错误的处理方式及对SEO的影响(更新)]]></title> 
<author>xiao5479 &lt;user@domain.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Sat, 06 Jan 2007 08:58:55 +0000</pubDate> 
<guid>http://www.bloghuman.com/post/227/#blogcomment76555</guid> 
<description>
<![CDATA[ 
	谢谢博主。<br/>不过我怎么去追踪百度的蜘蛛有没有眼爬行我的站点呢。是看日志吗，还有其他方法没。<br/>弱弱的问。呵呵<br/>再次说声谢谢！
]]>
</description>
</item><item>
<link>http://www.bloghuman.com/post/227/#blogcomment89018</link>
<title><![CDATA[[评论] 404错误的处理方式及对SEO的影响(更新)]]></title> 
<author>透视眼 &lt;user@domain.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Thu, 18 Jan 2007 11:46:50 +0000</pubDate> 
<guid>http://www.bloghuman.com/post/227/#blogcomment89018</guid> 
<description>
<![CDATA[ 
	我有个问题想请教您！<br/>我登陆一个网站出现以下问题，打开网页页面没问题，鼠标指针指在链接上面出现一个网址，“此网址显示不全如复制到地址栏打开为HTTP404错误，”但点击后出来一个新窗口的页面，此时原页面出现HTTP404错误，按返回可返回原页面，但有的链接也是如此显示，就无此问题，我有过之前的系统Ghost备份，用那个系统就没有任何问题，这个与我打系统补丁有关系吗？此问题已郁闷了我很长时间了，这个网站对我很重要，现在我要经常Ghost来回的系统来完成一些事情，请高手帮帮忙呀！
]]>
</description>
</item><item>
<link>http://www.bloghuman.com/post/227/#blogcomment98370</link>
<title><![CDATA[[评论] 404错误的处理方式及对SEO的影响(更新)]]></title> 
<author>zuoce &lt;user@domain.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Fri, 09 Mar 2007 02:42:55 +0000</pubDate> 
<guid>http://www.bloghuman.com/post/227/#blogcomment98370</guid> 
<description>
<![CDATA[ 
	知道http 200代码后面的数字是什么意思吗？是不是是读取网页的大小？
]]>
</description>
</item><item>
<link>http://www.bloghuman.com/post/227/#blogcomment98870</link>
<title><![CDATA[[评论] 404错误的处理方式及对SEO的影响(更新)]]></title> 
<author>散人 &lt;user@domain.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Thu, 19 Apr 2007 16:11:24 +0000</pubDate> 
<guid>http://www.bloghuman.com/post/227/#blogcomment98870</guid> 
<description>
<![CDATA[ 
	“在自定义网站的404错误页面时，对设置的错误页面URL链接应使用相对路径而不是绝对路径”。黑色梦中，是不是应该反过来才对？
]]>
</description>
</item><item>
<link>http://www.bloghuman.com/post/227/#blogcomment99498</link>
<title><![CDATA[[评论] 404错误的处理方式及对SEO的影响(更新)]]></title> 
<author>QIANJUN &lt;user@domain.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Wed, 27 Feb 2008 18:56:49 +0000</pubDate> 
<guid>http://www.bloghuman.com/post/227/#blogcomment99498</guid> 
<description>
<![CDATA[ 
	我设了404跳转，但碰到一些问题，如果由于网络或其他问题页面是可以打开但页面上图片无法读取显示，也会自动跳转，请问一下，如何避免图片显示跳转的问题，图片无法显示不需要跳转，如何设置。还有页中页的问题，就是页面中嵌套了IFRAM子页面，当子页面出现404错误跳转了，会带着父页面一起跳转。如果避免这种连带的现象，请指教。谢谢
]]>
</description>
</item><item>
<link>http://www.bloghuman.com/post/227/#blogcomment99940</link>
<title><![CDATA[[评论] 404错误的处理方式及对SEO的影响(更新)]]></title> 
<author>过河卒 &lt;user@domain.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Mon, 18 Aug 2008 06:18:40 +0000</pubDate> 
<guid>http://www.bloghuman.com/post/227/#blogcomment99940</guid> 
<description>
<![CDATA[ 
	您好&nbsp;&nbsp;我现在叫空间商按你在最后面的那个要求设置<br/>(四)在IIS/ASP.net下设置404静态页面<br/><br/><br/>空间上说这样设置了 但是我查的还是200啊 <br/><br/>我的文件是放在跟目录,用的是自由合租的有2个子站点 这个是其中的一个<br/><br/>同时404文件名404.htm&nbsp;&nbsp;谢谢
]]>
</description>
</item><item>
<link>http://www.bloghuman.com/post/227/#blogcomment99991</link>
<title><![CDATA[[评论] 404错误的处理方式及对SEO的影响(更新)]]></title> 
<author>seo &lt;seo121@126.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Thu, 25 Sep 2008 06:36:00 +0000</pubDate> 
<guid>http://www.bloghuman.com/post/227/#blogcomment99991</guid> 
<description>
<![CDATA[ 
	好 支持 写的不错
]]>
</description>
</item><item>
<link>http://www.bloghuman.com/post/227/#blogcomment99992</link>
<title><![CDATA[[评论] 404错误的处理方式及对SEO的影响(更新)]]></title> 
<author>seo &lt;user@domain.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Thu, 25 Sep 2008 06:44:52 +0000</pubDate> 
<guid>http://www.bloghuman.com/post/227/#blogcomment99992</guid> 
<description>
<![CDATA[ 
	好 支持 写的不错
]]>
</description>
</item><item>
<link>http://www.bloghuman.com/post/227/#blogcomment100008</link>
<title><![CDATA[[评论] 404错误的处理方式及对SEO的影响(更新)]]></title> 
<author>Cha &lt;connme@gmail.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Fri, 03 Oct 2008 13:11:35 +0000</pubDate> 
<guid>http://www.bloghuman.com/post/227/#blogcomment100008</guid> 
<description>
<![CDATA[ 
	正需要，学习了，
]]>
</description>
</item><item>
<link>http://www.bloghuman.com/post/227/#blogcomment100100</link>
<title><![CDATA[[评论] 404错误的处理方式及对SEO的影响(更新)]]></title> 
<author>b &lt;user@domain.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Sun, 14 Dec 2008 13:31:07 +0000</pubDate> 
<guid>http://www.bloghuman.com/post/227/#blogcomment100100</guid> 
<description>
<![CDATA[ 
	你这好像就是200
]]>
</description>
</item><item>
<link>http://www.bloghuman.com/post/227/#blogcomment100113</link>
<title><![CDATA[[评论] 404错误的处理方式及对SEO的影响(更新)]]></title> 
<author>justin &lt;justinwang@tom.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Sun, 21 Dec 2008 12:34:29 +0000</pubDate> 
<guid>http://www.bloghuman.com/post/227/#blogcomment100113</guid> 
<description>
<![CDATA[ 
	404错误问题不知道是不是对seo很有影响亚，以前从来没有重视过 http://www.buywoodvents.com
]]>
</description>
</item><item>
<link>http://www.bloghuman.com/post/227/#blogcomment100184</link>
<title><![CDATA[[评论] 404错误的处理方式及对SEO的影响(更新)]]></title> 
<author>xiaoyu &lt;user@domain.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Wed, 04 Feb 2009 03:01:18 +0000</pubDate> 
<guid>http://www.bloghuman.com/post/227/#blogcomment100184</guid> 
<description>
<![CDATA[ 
	学习了,博主
]]>
</description>
</item><item>
<link>http://www.bloghuman.com/post/227/#blogcomment100591</link>
<title><![CDATA[[评论] 404错误的处理方式及对SEO的影响(更新)]]></title> 
<author>毛衣 &lt;peter.guo@them.pro&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Mon, 24 May 2010 10:46:49 +0000</pubDate> 
<guid>http://www.bloghuman.com/post/227/#blogcomment100591</guid> 
<description>
<![CDATA[ 
	谢谢博主的博文，学习了
]]>
</description>
</item>
</channel>
</rss>