pwired Posted November 10, 2015 Share Posted November 10, 2015 Hi, I don't want google to index a website that I am building at the moment, for obvious reasons. The site should be indexed only, once it is completed. I don't like to use <meta name='robots' content='noindex,follow' /> because this will stop only legitimate engines and bots In the past I always could use a .htpasswd file and put this in the root .htaccess file: AuthUserFile /path/to/.htpasswdAuthType BasicAuthName "Identify"Require valid-user For some reason this seems to stop working and processwire multilanguage 2.6.1 throws a 404. I checked both .htaccess and .htpasswd for typo's, etc but can not find anything. If I remove again the 4 lines in the .htaccess file there are no errors. Now I have been looking in the index.php and checking all over any limitations on the host but it is going to take too much time to fix this. What about Adriaan's page protector module ? Does this only work for "pages" in the backend or also for root access ? What I need is blocking the whole site with a password for all search engines indexing until the site is ready. Link to comment Share on other sites More sharing options...
AndZyk Posted November 10, 2015 Share Posted November 10, 2015 Maybe the path to the ".htpasswd"-file is not correct. You can use this PHP-function to see the correct path: echo getcwd(); Beside that you could use a "robots.txt"-file for preventing search engines to crawl your site. A subdomain would also help I think as well as hiding the root page in ProcessWire. Link to comment Share on other sites More sharing options...
pwired Posted November 10, 2015 Author Share Posted November 10, 2015 Hi AndZyk, I double checked the full path to the root. I have put the .htpasswd file in the root next to .htaccess to simplify the path and still it is not working. Link to comment Share on other sites More sharing options...
MuchDev Posted November 10, 2015 Share Posted November 10, 2015 Yeah both of those modules block everything and redirect either to the login or a special page that you define. I use maintenance mode when I have to take my sites offline. One button and you are set. Link to comment Share on other sites More sharing options...
pwired Posted November 10, 2015 Author Share Posted November 10, 2015 I just tested this locally on my laptop with the same setup and there everything is working. It must have something to do with the host. Maybe the host doesn't like something in the index.php Ok MuchDev, thanks for that confirmation. I will install Adriaan's page protector module and stop wasting more time finding some unknown server host limitation. Link to comment Share on other sites More sharing options...
Mike Rockett Posted November 10, 2015 Share Posted November 10, 2015 Might be better to use Protected Mode: http://modules.processwire.com/modules/protected-mode/ 1 Link to comment Share on other sites More sharing options...
pwired Posted November 10, 2015 Author Share Posted November 10, 2015 This is working perfectly having it independent from all the different host limitations out there. Big thanks fly out to Adriaan. 1 Link to comment Share on other sites More sharing options...
Mike Rockett Posted November 10, 2015 Share Posted November 10, 2015 My apologies - I hadn't even read your full post before recommending it. ;-) 1 Link to comment Share on other sites More sharing options...
LostKobrakai Posted November 10, 2015 Share Posted November 10, 2015 If you only need to keep google (searchengines) away just use a robots.txt (google and others are legitimate bots / crawlers) User-agent: * Disallow: / Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now