We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 8416
    • 173 Posts
    Hi,
    A quick question; is it a good idea to use these 2 lines of code in your robots.txt file?
    User-agent: *
    Disallow: /manager/
    Disallow: /assets/
    


    Thanks for your input.
      • 32646
      • 87 Posts
      Don’t bother. You need a password to get past /manager and /assets gives you a 403 (forbidden) error.
        Just learning the ropes.
        • 28042 ☆ A M B ☆
        • 24,524 Posts
        Such a file certainly won’t hurt anything, though.
          Studying MODX in the desert - http://sottwell.com
          Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
          Join the Slack Community - http://modx.org
          • 3749
          • 24,544 Posts
          And there’s no point in having the files in those directories muddying up the search engine’s indexes.

          Bob
            Did I help you? Buy me a beer
            Get my Book: MODX:The Official Guide
            MODX info for everyone: http://bobsguides.com/modx.html
            My MODX Extras
            Bob's Guides is now hosted at A2 MODX Hosting
            • 30639
            • 22 Posts
            I go back and forth on this. Keeping application files out of the search engine’s index is a good idea. From a security standpoint I feel it’s best to obscure references to the application, thereby eliminating the temptation of a hack. This can’t be done in a robots.txt file which is publicly viewable and therefore provides insight as to the application used and the directory structure and consequently provides a roadmap to hacking. Using "noindex, nofollow" in the header of those files solves this issue but still potentially leaves the directories exposed.

            If this isn’t a concern, it’s quick and easy just to modify the robots.txt file as previously posted to prevent the indexing of those pages/directories.