如何禁止 robots.txt 中的特定页面 [英] How do I disallow specific page from robots.txt

查看:41
本文介绍了如何禁止 robots.txt 中的特定页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在我的网站上创建两个非常相似但用途不同的页面.一是感谢用户发表评论,二是鼓励用户订阅.

I am creating two pages on my site that are very similar but serve different purposes. One is to thank users for leaving a comment and the other is to encourage users to subscribe.

我不想要重复的内容,但我确实希望页面可用.我可以将站点地图设置为隐藏一个吗?我会在 robots.txt 文件中执行此操作吗?

I don't want the duplicate content but I do want the pages to be available. Can I set the sitemap to hide one? Would I do this in the robots.txt file?

禁止看起来像这样:

禁止:/wp-admin

Disallow: /wp-admin

我将如何自定义特定页面,例如:

How would I customize to the a specific page like:

http://sweatingthebigstuff.com/thank-you-for-commenting

推荐答案

Disallow: /thank-you-for-commenting

robots.txt

查看 last.fm robots.txt 文件以获得灵感.

这篇关于如何禁止 robots.txt 中的特定页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆