I have two related questions.

To start, in a robots.txt file can you just put the following for sitemap:

Sitemap: www.example.com

Or do you have to have:

Sitemap: http://www.example.com


Sitemap: https://www.example.com

My second question is the same thing but for the lines of a txt sitemap file?

1 Answer 1


Either you've got

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


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

You can't do without TLS, and you're either www or non-www.

Your robots.txt should reflect what is accurate.

  • 1
    Thank you good sir
    – Trevor
    Dec 30, 2021 at 8:08
  • You're welcome, good sir Jan 2, 2022 at 0:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.