Can a relative sitemap url be used in a robots.txt?

后端 未结 3 1297
遇见更好的自我
遇见更好的自我 2020-12-04 08:12

In robots.txt can I write the following relative URL for the sitemap file?

sitemap: /sitemap.ashx

Or do I have to use the complete (absolut

3条回答
  •  北海茫月
    2020-12-04 08:32

    Good technical & logical question my dear friend. No in robots.txt file you can't go with relative URL of the sitemap; you need to go with the complete URL of the sitemap.

    It's better to go with "sitemap: https://www.example.com/sitemap_index.xml"

    In the above URL after the colon gives space. I also like to support Deepak.

提交回复
热议问题