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 has to stay up.
A short conversation with an engineer. No quote-bot, no callback queue. We'll tell you honestly if we're not the right fit.