在哪里放置robots.txt文件? [英] Where to put robots.txt file?

查看:56
本文介绍了在哪里放置robots.txt文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

robots.txt 应该放在哪里?

Where should put robots.txt?

domainname.com/robots.txt

domainname/public_html/robots.txt

我将文件放在 domainname.com/robots.txt 中,但是当我在浏览器中输入时它没有打开.

I placed the file in domainname.com/robots.txt, but it's not opening when I type this in browser.

替代文字 http://shup.com/Shup/358900/11056202047-我的桌面.png

推荐答案

文件在文件系统中的位置取决于您使用的主机,因此我们很难给出具体的答案.

Where the file goes in your filesystem depends on what host you're using, so it's hard for us to give a specific answer about that.

最好的描述是:将它放在代表您主页的index.html(或index.php 或其他)文件的任何位置.例如,如果是 domainname/public_html/index.html,则将其放在 domainname/public_html/robots.txt 中.

The best description is: put it wherever the index.html (or index.php or whatever) file is that represents your homepage. If that's domainname/public_html/index.html, for example, put it in domainname/public_html/robots.txt.

这篇关于在哪里放置robots.txt文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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