网络营销电子商务研究中心  
How to buy the best prescription safety glasses in Canada? Let's study!
Go Back   网络营销电子商务研究中心 > 服务器与数据库 > 服务器环境搭建
User Name
Password
 
FAQ Members List Calendar Cheap Glasses

服务器环境搭建 Windows,Linux,IIS,Apache等服务器配置、安全维护以及PHP和MYSQL运行环境讨论。

Reply
 
Thread Tools Display Modes
  #1   IP: 218.2.66.241
Old 2009-09-12, 11:55 PM
car car is offline
高级会员
 
Join Date: 2006-05-14
Posts: 534
car 正向着好的方向发展
Default 如何使用robots文件禁止一个页面?

robots文件对于SEO高手来讲是必须的。

搜索引擎用来爬取网页内容的工具我们称之为搜索引擎机器人。
本资料严禁转载!搜索引擎机器人每次来到要抓取的网站,都会先访问这个网站根目录下的一个文件(robots.txt),如果不存在该文件,则搜索引擎机器人默认这个网站允许其全部抓取。

robots.txt是一个简单的纯文本文件(记事本文件),搜索引擎机器人通过robots.txt里的“说明”,理解该网站是否可以全部抓取或部分抓取。

如果你希望搜索引擎收录你网站的全部网页,则你可以不设置robots.txt或上传一个命名为robots.txt的空记事本到根本目录。

上传你的robots.txt后,通过 你的域名/robots.txt 可以正常访问。 注意,robots.txt的命名,都应该是小写。

访问如:http://www.0058.net/robots.txt

robots.txt文件的内容主要就是一个代码:Disallow

注意,robots.txt文件中一般要包含至少一个Disallow:

如果都允许收录,你可以写一行Disallow:/search.html 这个文件(search.html)本来就不存在也没事。

格式如:

User-agent: *

Disallow: /search.html

Disallow: /index.php?

Disallow: /tempweb/

User-agent: * 星号说明,允许所有的搜索引擎来收录,包括百度、google、yahoo等。

Disallow: /search.html 说明不允许收录 /search.html 这个文件。
Disallow: /index.php? 说明不允许收录以index.php?为前缀的链接如:index.php?122.html、index.php?=12、index.php?/baidu等等。
Disallow: /tempweb/ 说明不允许收录/tempweb/里的所有文件。但可以收录如:/tempwebtaim.html 的链接。
这里介绍的是常用的几个代码。



想成为未来的SEO高手,你需要深入了解并充分利用robots.txt。。
1、当你的网页已被收录,但想用robots.txt删除掉,一般需要1-2个月。
2、结合Google网站管理员工具,你可以马上删除被Google收录的网页。
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is On
HTML code is Off

Forum Jump

Prescription-glasses.com offers prescription glasses online at discount prices.
All times are GMT +8. The time now is 03:43 AM.


Powered by vBulletin Version 3.8.7
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.