上传robots.txt到根文件夹失败
我想阻止机器人索引我的网站。我创建了一个包含以下内容的 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?
Thanks.
UPDATE
Here is the content of the httpdocs folder
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
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!
httpdocs
是您网站的根目录。httpdocs
is the root of your website.