gpt4 book ai didi

sitemap - 我可以在 robots.txt 和 sitemap.xml 中使用非拉丁字符吗?

转载 作者:行者123 更新时间:2023-12-04 02:28:00 26 4
gpt4 key购买 nike

我可以像这样在我的 robots.txt 文件和 sitemap.xml 中使用非拉丁字符吗?

robots.txt

User-agent: *
Disallow: /somefolder/

Sitemap: http://www.domainwithåäö.com/sitemap.xml

站点地图.xml
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url><loc>http://www.domainwithåäö.com/</loc></url>
<url><loc>http://www.domainwithåäö.com/subpage1</loc></url>
<url><loc>http://www.domainwithåäö.com/subpage2</loc></url>
</urlset>

还是我应该这样做?

robots.txt
User-agent: *
Disallow: /somefolder/

Sitemap: http://www.xn--domainwith-z5al6t.com/sitemap.xml

站点地图.xml
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url><loc>http://www.xn--domainwith-z5al6t.com/</loc></url>
<url><loc>http://www.xn--domainwith-z5al6t.com/subpage1</loc></url>
<url><loc>http://www.xn--domainwith-z5al6t.com/subpage2</loc></url>
</urlset>

最佳答案

https://support.google.com/webmasters/answer/183668谷歌写道:“确保你的 URL 遵循 URI 的 RFC-3986 标准,IRI 的 RFC-3987 标准”,所以我想正确的答案是你必须遵循这两个标准。

我最好的猜测是这无关紧要,因为谷歌认为这两个 URL 是相同的。这也可能是标准中规定的内容,但我不擅长阅读这些内容,因此我无法确认或否认。

使用 xn--格式有效。我还没有尝试使用 Unicode 字符来查看它是否也有效。

关于sitemap - 我可以在 robots.txt 和 sitemap.xml 中使用非拉丁字符吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31683642/

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