Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>The keyword here is <code>robots.txt</code></p> <p>More information on:</p> <ul> <li><a href="http://www.robotstxt.org/" rel="nofollow noreferrer">http://www.robotstxt.org/</a></li> <li><a href="http://support.google.com/webmasters/bin/answer.py?hl=en&amp;answer=156449" rel="nofollow noreferrer">http://support.google.com/webmasters/bin/answer.py?hl=en&amp;answer=156449</a></li> </ul> <p>Remember that this is only a <strong>recommendation</strong>; malicious bots/crawlers/spiders could scan/find/discover the directory anyway. On the downside: malicious bots/crawlers/spiders will use exactly this file to quickly discover which directories aren't supposed to be 'discovered'. What you need is a login mechanism, not a way to "hide" the admin directory.</p> <p>You can also resort (as <a href="https://stackoverflow.com/a/15660154/215042">mentioned by Harry Beasant</a>) to a .htaccess but this <em>also</em> simply excludes searchengines and not malicious users (and, specifically Harry Beasant's "answer" also causes another <em>innocent</em> site to get unwanted traffic <img src="https://i.stack.imgur.com/sxbYJ.gif" alt="not cool">... seriously uncool). Also: a lot of searchengines won't get rewritten; so this might solve your "problem" for Google/MSN/... but not, for example, Bing or Baidu (two major players in the searchengine world). Finally, what Harry left out (or didn't specifically mention), is that you need to put this .htaccess <em>in the admin directory</em>; if you accidentilly put it in your sites root the site will disappear from those searchengines completely. Your hard-earned reputation out the window with a tiny mistake <img src="https://i.stack.imgur.com/MpLv9.gif" alt="bye bye">. Very dangerous if you ask me.</p> <p>Disabling directory listings (as <a href="https://stackoverflow.com/a/15660178/215042">mentioned by Squeezy</a>) is <em>always</em> a good idea, not only for admin directories. But, again, this doesn't prevent malicious users to "discover" your admin directory.</p> <p>Just <strong>don't rely on <a href="http://en.wikipedia.org/wiki/Security_through_obscurity" rel="nofollow noreferrer">Security through obscurity</a></strong> and get yourself a decent login mechanism in place.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload