Forum Moderators: open
I have private web space for uploading family photos, personal messages, etc. Recently, someone discovered a particular page despite the fact that I hadn't given them the URL -- said he'd searched for associated html/htm connected to the the root URL (since I'd included him in a previous private mailing a few years ago).
Is there any way to add HTML code to a page which would prevent people from doing this? Or a bit of code which would require the user to enter a password before displaying the page? I have:
<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
in the <head> tags.
I'd like to maintain privacy for this kind of content, somehow.
The only sure-fire way of controlling access to your content is to password-protect the site or directory. The easiest way is to use what is called "basic authentication", which is available only on web servers running Apache. Luckily this accounts for a large majority of servers out there. If in doubt, ask your hosting company.
The precise setup depends on your specific needs, but a good overview is available in the Apache documentation:
Would you want to use one username / password for all, or one per user?