← ServerPilot Docs

How to Allow IP Addresses with a .htaccess File

If you wish to only allow specific addresses to access an app, you can add the following to your app's .htaccess file:

<RequireAny>
Require ip 1.2.3.4
Require ip 23.34.45.56
</RequireAny>

Be sure to replace 1.2.3.4 and 23.34.45.56 with the IP addresses you want to allow.

Apache also offers more information on configuring access control from your app's .htaccess file.

Launch your first site in 5 minutes