Knowledgebase · .htaccess
How to enable access to website only from specified IP address?
Last updated 2019-02-04
Create a file named .htaccess in your public_html folder and add the following lines:
+-+-+-+-+-+-+-+-+
order deny,allow
deny from all
allow from IP
allow from IP
allow from IP
+-+-+-+-+-+-+-+-+
Then replace IP with your IP address or IP address from which you want to allow access.
+-+-+-+-+-+-+-+-+
order deny,allow
deny from all
allow from IP
allow from IP
allow from IP
+-+-+-+-+-+-+-+-+
Then replace IP with your IP address or IP address from which you want to allow access.
Tell us what you need
Compare available plans or describe your workload so we can discuss a suitable starting point.