How to Restrict Access to Directories by IP Address - SiteWorx

SShaltai-Boltai April 26, 2026 2 min read 0 views

To secure your admin area from hackers, you should only allow access to your admin directory from selected IP addresses. You can create a dot htaccess file in the directory where you want to restrict access to specific IP addresses.

For example, if you have a WordPress blog installed on your main directory and you log in via example.com/wp-admin, you should create an htaccess file in /wp-admin/.htaccess and put the following code into it. Please, don't forget to replace the allowed IP address with your IP address.

order deny, allow
deny from all
allow from YOUR-IP-ADDRESS-HERE

Replace the Your-IP-Address-Here text with your IP address.


You can test this by accessing the wp-admin directory from another IP address, not mentioned in your htaccess file.

//RELATED ARTICLESALL ARTICLES →
April 26, 2026 2 min read 0

How to Change the VPS Root/Admin Password in SolusVM 2

You can change the root/admin password of your VPS Operating System using SolusVM 2.1. Log in to your SolusVM 2 Control Panel. 2. Under Projects, click on the project that contains your VPS. 3. Click on the appropriate VPS. 4. Go to the Boot & Rescue tab. 3. Click Reset Root Password, then cl...

SShaltai-Boltai Read more
April 26, 2026 2 min read 0

How to Install an OS from ISO in SolusVM 2

Installing an OS from an ISO image allows customization, such as partition editing and other options. Follow the steps below to install an OS using an ISO image in SolusVM 2.1. Log in to your SolusVM 2 Control Panel. 2. Under Projects, click on the project that contains your VPS. 3. Click on the ...

SShaltai-Boltai Read more
April 26, 2026 2 min read 0

How to Reinstall an OS Using SolusVM 2

You can easily Install/Reinstall the operating system using SolusVM 2. However, note that this option will destroy all the data on your VPS.1. Log in to your SolusVM 2 Control Panel. 2. Under Projects, click on the project that contains your VPS. 3. Click on the appropriate VPS. 4. Click on Reins...

SShaltai-Boltai Read more
April 26, 2026 2 min read 0

How to Access VPS via VNC in SolusVM 2

You can access your VPS via VNC in an emergency, such as when a firewall blocks your IP, the Internet connection on the VPS is not working, and when you cannot access SSH. Also, you can use VNC for OS installation/reinstallation.1. Log in to your SolusVM 2 Control Panel. 2. Under Projects, click ...

SShaltai-Boltai Read more