Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
10-23-2012, 10:46 PM #1
- Join Date
- Nov 2006
- Thanked 1 Time in 1 Post
Password protect site/hide from search engines
I'm working on a webpage for my employer. It needs to be password protected, and invisible to search engines. I'm just wondering if there's some script that will accomplish this, as I'm rather noobish. I have managed in the past to cobble together a purchase history page with PHP and MySQL but that was a few years ago.
I can follow instructions, just don't know how to write scripts.
The username should be the same for all users.
I'd like to be able to set and modify a guest password (if someone at my work doesn't have their own email account, they can access the webpage but I can change the guest password each time someone leaves the company).
I'd like users to sign up via email verification - but only allow emails from a specific domain, like @myemployer.com
Would I need to use such a script on each page that I want protected?
Sorry if these are noob questions...
10-24-2012, 06:36 PM #2
Search Engines honor the conditions in the Robots.txt file, you can use it to block specific user agents. So you can even block a specific search engine because each search engine has a user_agent string like 'YahooSpider'.
So to block all search engines:
Make a robots.txt file and put it in the root of the web server - e.g public_html. Then write this starting from the first line:
To password protect it, basic HTTP authentication with sessions will do it.Code:User-agent: * Disallow: /
Last edited by Redcoder; 10-24-2012 at 08:34 PM.