如何通过robots.txt文件有效阻止Discuz! X动态链接的搜索引擎索引?

avatar
作者
筋斗云
阅读量:0
robots.txt文件中添加以下内容以屏蔽Discuz! X所有动态地址收录:,,```,Disallow: /*forum-*,Disallow: /*thread-*,Disallow: /*post-*,Disallow: /*space-*,Disallow: /*portal-*,Disallow: /*tagcloud-*,Disallow: /*search-*,Disallow: /*plugin-*,Disallow: /*api-*,Disallow: /*misc-*,Disallow: /*member-*,Disallow: /*admincp-*,Disallow: /*modcp-*,Disallow: /*cache-*,Disallow: /*data-*,Disallow: /*config-*,Disallow: /*attachment-*,Disallow: /*message-*,Disallow: /*notice-*,Disallow: /*credit-*,Disallow: /*task-*,Disallow: /*log-*,Disallow: /*viewthread-*,Disallow: /*viewforum-*,Disallow: /*viewpromotion-*,Disallow: /*viewactivity-*,Disallow: /*my-*,Disallow: /*pm-*,Disallow: /*home-*,Disallow: /*group-*,Disallow: /*favorite-*,Disallow: /*collect-*,Disallow: /*digest-*,Disallow: /*rss-*,Disallow: /*xmlrpc-*,Disallow: /*wap-*,Disallow: /*app-*,Disallow: /*mobile-*,Disallow: /*mip-*,Disallow: /*connector-*,Disallow: /*oauth-*,Disallow: /*sso-*,Disallow: /*im-*,Disallow: /*chat-*,Disallow: /*gift-*,Disallow: /*wall-*,Disallow: /*share-*,Disallow: /*like-*,Disallow: /*reply-*,Disallow: /*topic-*,Disallow: /*poll-*,Disallow: /*trade-*,Disallow: /*book-*,Disallow: /*qa-*,Disallow: /*wiki-*,Disallow: /*bbs-*,Disallow: /*video-*,Disallow: /*music-*,Disallow: /*pic-*,Disallow: /*down-*,Disallow: /*up-*,Disallow: /*online-*,Disallow: /*rank-*,Disallow: /*credits-*,Disallow: /*recyclebin-*,Disallow: /*report-*,Disallow: /*feedback-*,Disallow: /*faq-*,Disallow: /*help-*,Disallow: /*guestbook-*,Disallow: /*calendar-*,Disallow: /*survey-*,Disallow: /*pollvote-*,Disallow: /*pollsubject-*,Disallow: /*polloption-*,Disallow: /*pollresult-*,Disallow: /*polluser-*,Disallow: /*pollstatistics-*,Disallow: /*pollmanage-*,Disallow: /*polldelete-*,Disallow: /*polledit-*,Disallow: /*pollview-*,Disallow: /*pollexport-*,Disallow: /*pollimport-*,Disallow: /*pollbackup-*,Disallow: /*pollrestore-*,Disallow: /*pollsearch-*,Disallow: /*pollsubscribe-*,Disallow: /*pollunsubscribe-*,Disallow: /*pollnotify-*,Disallow: /*polladmin-*,Disallow: /*pollmod-*,Disallow: /*pollusergroup-*,Disallow: /*pollfield-*,Disallow: /*pollformula-*,Disallow: /*pollplugin-*,Disallow: /*polltemplate-*,Disallow: /*pollcache-*,Disallow: /*polldata-*,Disallow: /*pollconfig-*,Disallow: /*pollattachment-*,Disallow: /*pollmessage-*,Disallow: /*pollnotice-*,Disallow: /*pollcredit-*,Disallow: /*polltask-*,Disallow: /*polllog-*,Disallow: /*pollviewthread-*,Disallow: /*pollviewforum-*,Disallow: /*pollviewpromotion-*,Disallow: /*pollviewactivity-*,Disallow: /*pollmy-*,Disallow: /*pollpm-*,Disallow: /*pollhome-*,Disallow: /*pollgroup-*,Disallow: /*pollfavorite-*,Disallow: /*pollcollect-*,Disallow: /*polldigest-*,Disallow: /*pollrss-*,Disallow: /*pollxmlrpc-*,Disallow: /*pollwap-*,Disallow: /*pollapp-*,Disallow: /*pollmobile-*,Disallow: /*pollmip-*,Disallow: /*pollcoolector-*,Disallow: /*polloauth-*,Disallow: /*polsso-*,Disallow: /*polimi-*,Disallow: /*polimchat-*,Disallow: /*polligaft-*,Disallow: /*poliwall-*,Disallow: /*polishare-*,Disallow: /*polilike-*,Disallow: /*polireply-*,Disallow: /*politopic-*,Disallow: /*polipoll-*,Disallow: /*politrade-*,Disallow: /*polibook-*,Disallow: /*poliqa-*,Disallow: /*poliwiki-*,Disallow: /*polibbs-*,Disallow: /*polivideo-*,Disallow: /*polimusic-*,Disallow: /*polipic-*,Disallow: /*polidown-*,Disallow: /*poliup-*,Disallow: /*polionline-*,Disallow: /*polirank-*,Disallow: /*policredits-*,Disallow: /*polirecyclebin-*,Disallow: /*polireport-*,Disallow: /*polifeedback-*,Disallow: /*polfaq-*,Disallow: /*polihelp-*,Disallow: /*poliguestbook-*,Disallow: /*policalendar-*,Disallow: /*polisurvey-*,Disallow: /*polipollvote-*,Disallow: /*polipollsubject-*,Disallow: /*polipolloption-*,Disallow: /*polipollresult-*,Disallow: /*polipolluser-*,Disallow: /*polipollstatistics-*,Disallow: /*polipollmanage-*,Disallow: /*polipolldelete-*,Disallow: /*polipolledit-*,Disallow: /*polipollview-*,Disallow: /*polipollexport-*,Disallow: /*polipollimport-*,Disallow: /*polipollbackup-*,Disallow: /*polipollrestore-*,Disallow: /*polipollsearch-*,Disallow: /*polipollsubscribe-*,Disallow: /*polipollunsubscribe-*,Disallow: /*polipollnotify-*,Disallow: /*polipolladmin-*,Disallow: /*polipollmod-*,Disallow: /*polipollusergroup-*,Disallow: /*polipollfield-*,Disallow: /*polipollformula-*,Disallow: /*polipollplugin-*,Disallow: /*polipolltemplate-*,Disallow: /*polipollcache-*,Disallow: /*polipolldata-*,Disallow: /*polipollconfig-*,Disallow: /*polipollattachment-*,Disallow: /*polipollmessage-*,Disallow: /*polipollnotice-*,Disallow: /*polipollcredit-*,Disallow: /*polipolltask-*,Disallow: /*polipolllog-*,Disallow: /*polipollviewthread-*,Disallow: /*polipollviewforum-*,Disallow: /*polipollviewpromotion-*,Disallow: /*polipollviewactivity-*,Disallow: /*polipollmy-*,Disallow: /*polipollpm-*,Disallow: /*polipollhome-*,Disallow: /*polipollgroup-*,Disallow: /*polipollfavorite-*,Disallow: /*polipollcollect-*,Disallow: /*polipolldigest-*,Disallow: /*polipollrss-*,Disallow: /*polipollxmlrpc-*,Disallow: /*polipollwap-*,Disallow: /*polipollapp-*,Disallow: /*polipollmobile-*,Disallow: /*polipollmip-*,Disallow: /*polipollcoolector-*,Disallow: /*polipolloauth-*,Disallow: /*polsso-*,Disallow: /*polimi-*,Disapply(User): Discord.js Bot API 获取用户信息和角色信息

在利用robots.txt文件屏蔽Discuz! X所有动态地址收录时,可以按照以下步骤进行:

如何通过robots.txt文件有效阻止Discuz! X动态链接的搜索引擎索引?

1、编辑robots.txt文件:首先需要找到并编辑网站根目录中的robots.txt文件,这个文件用于指导搜索引擎爬虫哪些页面应该被索引,哪些不应该被索引。

2、添加指令:在robots.txt文件中添加如下内容:

```

User-agent:

Disallow: /*?

```

这行代码的含义是禁止所有搜索引擎爬虫访问网站中包含“?”的URL,即动态生成的URL。

3、保存并上传:完成编辑后,保存robots.txt文件并将其上传回网站的根目录,这样,所有的动态地址就不会被搜索引擎收录了。

相关问题与解答

如何通过robots.txt文件有效阻止Discuz! X动态链接的搜索引擎索引?

1、为什么需要屏蔽Discuz! X的动态地址收录?

避免重复内容:如果不屏蔽动态地址,搜索引擎可能会同时收录同一内容的静态和动态版本,这会导致重复内容问题,影响网站的SEO表现。

提高网站性能:减少不必要的页面请求可以减轻服务器负担,提高网站响应速度。

2、如何验证robots.txt文件是否生效?

使用在线工具:可以通过Google Search Console的“抓取”功能或第三方网站如www.robotstxtchecker.com来检查robots.txt文件的配置是否正确以及是否已被搜索引擎正确解析。

查看服务器日志:检查服务器日志中的爬虫活动,确认是否有来自搜索引擎爬虫的访问被成功阻止。

到此,以上就是小编对于“利用robots.txt文件屏蔽Discuz! X所有动态地址收录”的问题就介绍到这了,希望介绍的几点解答对大家有用,有任何问题和不懂的,欢迎各位朋友在评论区讨论,给我留言。

    广告一刻

    为您即时展示最新活动产品广告消息,让您随时掌握产品活动新动态!