gpt4 book ai didi

html - Lighthouse - robots.txt 错误语法不理解

转载 作者:行者123 更新时间:2023-11-28 20:26:48 27 4
gpt4 key购买 nike

当我测试 my website使用 Lighthouse 它告诉我它发现了 50 个 robots.txt 错误,我不知道问题是什么以及如何解决它们。它显示了我的 index.html 文件的内容,每行都有错误。 问题是什么?以及如何解决??

最佳答案

嗯,最近遇到了类似的问题。我所要做的就是手动生成 robots.txt。只需谷歌一下 - generate robots.txt。然后将其上传到您的应用程序。生成 sitemap.xml 也很好。

如果你太懒了,你可以复制粘贴下面的代码:

User-agent: *
Allow: /
Disallow: /example // example is directory u want to exclude,
// if u dont want to exclude anything, just remove this line

Sitemap: https://example.com/sitemap.xml

关于html - Lighthouse - robots.txt 错误语法不理解,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53090417/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com