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.

  1. Log into SiteWorx.
  2. In the Hosting Features area, select Htaccess.
    Select Htaccess from the Hosting Features Section
  3. 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.
    Click Edit Next to the Global Directory to Which you Want to Control Access
  4.  In the top section, select the Global Access Control button.
    Click the Global Access Control Button
  5. Fill out the following information:

    1. 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).
      1. 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.
      2. 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.
    2. 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.
    3. 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.
    4. 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.