上传robots.txt到根文件夹失败

发布于 2025-01-01 14:32:04 字数 425 浏览 3 评论 0原文

我想阻止机器人索引我的网站。我创建了一个包含以下内容的 robots.txt 文件:

User-agent: *
Disallow: /

现在我必须将此文件放置在我网站的根文件夹中。我尝试使用我的 ftp 软件,但它不起作用。上传失败。正如您在下图中看到的,我尝试在最顶层 ( / )。正确吗?或者我是否必须将文件上传到 /httpdocs 文件夹中?

在此处输入图像描述

谢谢。


更新

这是httpdocs文件夹的内容

在此处输入图像描述

I would like to prevent robots to index my web site. I created a robots.txt file with this content:

User-agent: *
Disallow: /

Now I must place this file in the root folder of my website. I try with my ftp software but it doesn't work. The upload failed. As you can see on the picture below, I try at the very top level ( / ). Is it correct? Or do I have to upload the file in the /httpdocs folder?

enter image description here

Thanks.


UPDATE

Here is the content of the httpdocs folder

enter image description here

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

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

发布评论

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

评论(2

柠檬色的秋千 2025-01-08 14:32:04

robots.txt 应位于您的网站根目录所在的位置。从屏幕截图来看,您似乎应该将其放入 httpdocs 中。

要检查...将其复制到那里,然后导航到 yoursite.com/robots.txt 。如果你得到 404,那么它就在错误的地方。如果您看到 robots.txt 文件,就可以开始了!

robots.txt should go where the root of your website is. It looks like you should put it in httpdocs from your screenshots.

To check...copy it there, and navigate to yoursite.com/robots.txt . If you get a 404, then it's in the wrong place. If you see your robots.txt file, you're good to go!

記柔刀 2025-01-08 14:32:04

httpdocs 是您网站的根目录。

httpdocs is the root of your website.

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