Restrict Access to Website via Domain or IP Address in SiteWorx
Using SiteWorx, you can restrict access to your website to only those people visiting from certain IP addresses or domains. This would be useful if you have a development version of your main site and you only want people from your business IP address or logged into your intranet to be able to access it. Alternately, you can allow everyone to visit and only block access from specific IP addresses or domains. That is useful if you notice you're getting abusive connections from specific locations.
⚠️ Blocking or whitelisting a lot of domains or IP addresses can place quite a load on your web server, as it must check every access to see if it is coming from one of the specified locations. It is best to use this feature sparingly.
-
Log into SiteWorx.
-
In the Hosting Features area, select Htaccess.
-
Now you need to select where you want your access rules to apply. If you want it to apply to your entire domain, select the appropriate directory from the list in the Global Directory Options section and click Edit.
-
In the top section, select the Global Access Control button.
-
Fill out the following information:
-
Access Order defines whether you want this to be a whitelist (only allow those IPs or domains I specify) or a blacklist (allow everyone except for those IPs or domains I specify).
-
Deny first, then allow: This refuses everyone access to your site except for those you explicitly permit. You will whitelist the allowed IPs or domains by putting them into the Trusted Hosts list below.
-
Allow first, then deny: This allows everyone to access your site except for those you explicitly block. You will blacklist those you don't want to access your site by entering their domain(s) or IP(s) into the Blocked Hosts list below.
-
-
Enter IP addresses, IP ranges or domain/host names, one per line into the Trusted Hosts list if you want to whitelist a few people to be able to access your site.
-
Enter IP addresses, IP ranges or domain/host names, one per line into the Blocked Hosts list if you want to blacklist a few locations so they cannot access your site.
-
Click Update to apply your changes or Cancel to revert to the previous settings.
-
✅ You should test your changes by trying to visit your site from an allowed and denied IP address.
⚠️ If you whitelist your office IP address and it changes, don't forget to come back and make changes here or you won't be able to access your site.
This only blocks access to your website (anything served by Apache). It does not block access to other services like FTP, mail, or InterWorx.