Or you can use a simple HTTP password lock or what ever it's called. In cPanel you should have an option for password protecting directories. The directory you want to password protect is the index. I do exactly this on a duplicate phpBB forum just for testing. Its index is password protected so that Google doesn't index it and other things as I would have dup content and it keeps my site to myself for testing.
Now mind you hackers know a thing or two about cracking a password protected directory in this fashion. One is just by sheer brute force. If you use a good username and a password that's at least 16 characters long, brute force won't work. Unless of course quantum computing rolls around.
Another method is by changing the get request, but I tried that and it didn't work. I think Apache and Litespeed have fixed that vulnerability. To take the security up a notch use CIDRAM, Ninjafirewall and CloudFlare. Read my signature on all that.
Keep in mind that if you don't want any of your content read by Google bot, etc, you'll have to set up the correct read permissions. I think it's under group forum permissions that you can deny bots read access.