如何使用通配符阻止机器人对此进行索引?

发布于 2024-12-21 07:24:13 字数 178 浏览 6 评论 0 原文

我有以下 URL 格式:

example.com/page/m6aoeh/embed

想阻止任何机器人使用 URL /page/*/embed 索引任何页面

我 我假设有某种方法可以阻止通配符 URL,但只是不确定在这种特殊情况下如何执行。

I have the following URL format:

example.com/page/m6aoeh/embed

I want to block any bots from indexing any page with the url /page/*/embed

I'm assuming there's some way to do wildcard URL block, but just not sure how to do it in this particular case.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

山色无中 2024-12-28 07:24:13

如果您只是想告诉机器人 /page/ 文件夹下的所有内容都不应该被机器人索引,请使用 robots.txt 排除标准。创建一个如下所示的 /robots.txt

User-agent: *
Disallow: /page/

如果您希望机器人索引 /page 文件夹下的某些页面而不是其他页面,则需要添加 < < 中的 href="http://www.robotstxt.org/meta.html" rel="nofollow"> 标记 /code> 到您想要的每个页面排除。

<meta name="robots" content="noindex, nofollow" />

If you simply want to indicate to bots that everything under the /page/ folder should not be indexed by bots, use the robots.txt exclusion standard. Create a /robots.txt that looks like this:

User-agent: *
Disallow: /page/

If you want bots to index some pages under the /page folder but not others, you'll need to add a <meta> tag in the <head> to each page you want to exclude.

<meta name="robots" content="noindex, nofollow" />
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文