example.com/sitemap.xml 返回带有双 https://的 loc,使得生成的站点地图不正确/ Not Acceptable 。
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml">
<url>
<loc>https://https://example.com</loc>
<changefreq>monthly</changefreq>
<priority>1.0</priority>
</url>
我尝试将 sitemaps.py 文件中的协议(protocol)从 https 更改为 http,但仅在 https://example.com/ 前面附加 http://.
有什么想法吗?
最佳答案
我的解决方案:
我进入管理面板并重命名了该网站。这次前面没有协议(protocol)。
关于Django 站点地图生成 https ://in loc TWICE in Development,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/75184767/