Hide sitemap.xml in robots.txt

My robots.txt file automatically displays the sitemap.xml. I need to hide it for various important reasons.

How can I do this?


Here is my site Read-Only: LINK
(how to share your site Read-Only link)

Hi! @Evan1 did you ever figure this out? I’m trying to figure out how to remove this as well.

Export your Site and create any files in your directory.

Hello @Ivan_Sugerman. Great to hear from you and welcome to the forums.

If you have the site map generated automatically, then it won’t display in the robots.txt. We needed to customise this because we’re using a reverse proxy - hence the pain.

Short answer… no - no direct and native fix.

Workaround… I left it exposed and added a ‘canonical’ reference to each page to help the correct version index, while deindexing alternatives. I hope this makes sense.