重定向请求时 URL 应该在 sitemap.xml 中

Which URL should be in sitemap.xml when redirecting request

我正在使用 Laravel 框架来开发我的网站,我还想创建站点地图。在我的控制器中,我将 'root' 请求 http://www.example.com/ 重定向到 http://www.example.com/home。现在应该在站点地图文件中定义哪个url?

这个...

<url>
    <loc>http://www.example.com/</loc>
</url>

...或者这个?

<url>
    <loc>http://www.example.com/home</loc>
</url>

使用站点地图(在 sitemaps.org 中指定)"to inform search engines about pages on their sites that are available for crawling"。

因此请始终添加搜索引擎可能抓取和编入索引的那些(规范)URL。

他们无法抓取 http://www.example.com/,因为它首先不是页面,因此您应该添加 http://www.example.com/home