user10980228
user10980228

Reputation: 637

How to prevent public access to a website

I have accessed websites before where I need to put in an IP address and url into a host file and this is the only way to access it. If you don't put the details into a host file and visit the url, you won't see the website. By how do I actually make my website behave in this way in that it is not accessible without using the host file? I have a wordpress site on shared hosting.

Upvotes: 1

Views: 2277

Answers (2)

Hritik Pandey
Hritik Pandey

Reputation: 959

You can use this plugin restricted site access. It will allow you to change your ip after login and show a message to other ip address users until the website is in development.

Upvotes: 1

Kamran
Kamran

Reputation: 531

You can use .htaccess to limit access only from your public internet IP:

ErrorDocument 403 /403.html
Order Allow,Deny
Allow from yourip

or use .htaccess Authentication

Upvotes: 1

Related Questions