我的网站使用上下文路径(例如: www.example.com/abc)。robots.txt可以在www.example.com/abc/robots.txt上找到,我在webserver中给出了301重定向,将www.example.com/robots.txt重定向到www.example.com/abc/robots.txt。
我的问题是,搜索引擎是否能够读取robots.txt文件,因为它有301重定向?
发布于 2017-06-12 18:08:26
Robots.txt应位于根级别
https://example.com/robots.txt - Correct
https://blog.example.com/robots.txt - Correct
https://example.com/abc/robots.txt - Not Correct
https://blog.example.com/abc/robots.txt - Not Correct如果它在子目录/子文件夹上,那么它将返回404Error(因为它们只在根目录上进行调用)和Google will ignore your robots.txt completely if it is return 301 or 404 error.
发布于 2017-12-13 06:00:52
已发现搜索引擎支持301重定向并从子文件夹中读取文件。
https://stackoverflow.com/questions/43236807
复制相似问题