If you want to restrict general access to website and open it for certain users, the fastest solution is using restriction in .htaccess file. For example, you develop a website and want that nobody sees it, except of the customer.
How to restrict access?
Step 1. Open.htaccess file
Step 2. Make the following changes:
Order Deny,Allow Deny from all Allow from 188.8.131.52 Allow from 184.108.40.206