If you need to redirect restricted access for your site to visitors who are logged in or accessing the site from a set of specified IP addresses
I do not often recommend to use of plugins,the Restricted Site Access plugin can be very helpful in limiting access to your WordPress site.
How to Install Restricted Site Access Plugin on your WordPress site:
Login to WordPress Dashboard via http://wordpresssite.com/wp-admin.php or http://wordpresssite.com/wp-login.php (replace wordpresssite.com with your actual domain name).
Click On Plugins >> Add New.
Search “Restricted Site Access” and click Search Plugins.
Click Install Now >> OK
Activate the plugin through the ‘Plugins’ menu in WordPress
Configure the plugin
Go to Plugins >> Installed Plugins.
Search for Restricted Site Access plugin and click Settings.
In the Site Visibility section, click Restrict site access to visitors who are logged in or allowed by IP address.
In the Handle Restricted Visitors section, click on the action of your choice.
In the Unrestricted IP Addresses section, add any IP addresses that are allowed to have unrestricted access to your WordPress site. This should include your developers and/or website designers.
Click Add My Current IP Address. This will ensure that you to have unrestricted access to your site.
Click Save Changes.