Whitelisting IP: Definition and How to Whitelist IP Address

Whitelisting IP: Definition and How to Whitelist IP Address

IP whitelist is one of the efforts to secure websites and computer networks from hackers. By implementing IP whitelist, only specific individuals can access the website settings and your personal data.

So, what is IP whitelist? What are its benefits? And how does IP whitelist work? Well, in this article, we will not only explain these three aspects but also how to perform IP address whitelisting. Let's explore together!

Definition of IP Whitelist

IP whitelist is a cybersecurity method that allows access to a network or website settings only through specific IP addresses. Meanwhile, attempts to access via other IP addresses will be denied.

You can also use IP whitelist to filter incoming emails to your domain's inbox. This can be achieved by permitting only certain email addresses.

In other words, IP whitelist efforts can help enhance the security of your network, website settings, and email inbox.

The process of whitelisting IP addresses involves listing all the IP addresses that require authorized access. However, this approach can be time-consuming, especially when dealing with dozens of remote employees within a company who need to connect to the corporate network.

Definition of IP Whitelist

As an alternative method for IP whitelist, you can implement it for a single IP address. Consequently, individuals who wish to gain access must utilize a VPN configured to use that specific IP address.

At first glance, IP whitelist appears similar to a blacklist. Nevertheless, their operational mechanisms are different.

With IP whitelist, you specify the IP addresses allowed to access. On the contrary, a blacklist blocks access based on the IP addresses you designate.

Now, what are the benefits of implementing IP whitelist?

Benefits of IP Whitelist

IP whitelist offers several benefits, including:

1. Increased Computer Network Security

The way IP whitelist works allows a computer network to be accessed only by specific parties. For instance, a company's network can only be entered by individuals using the company's IP address. Therefore, the network becomes less vulnerable to unauthorized access by intruders.

2. Facilitates Remote Work Operations

By implementing IP whitelist, companies can securely carry out remote work operations. This is because only those with registered IP addresses are granted access to the company's network, ensuring that sensitive data remains inaccessible to unauthorized users.

3. Enhanced Website Control Panel Security against Hackers

If you manage a website, IP whitelist functionality enables you to restrict access to the website's control panel based on specific IP addresses. Consequently, hackers are unable to easily log in to your website's settings.

4. Protection of Servers against Spam and DDoS Attacks

Servers can be at risk of going down due to data traffic attacks like spam and DDoS. With IP whitelist measures in place, you can safeguard your server from such attacks.

Also, read: What is Email Spam? Here's How to Deal with It!

When Do You Need to Perform IP Whitelisting?

You need to implement IP whitelisting for the following purposes:

1. Network Firewall Configuration

In a computer network, such as a company LAN, access should be restricted only to authorized personnel from that organization. To secure the network, you need to perform IP whitelisting.

2. Wi-Fi Router Firewall Configuration

Wi-Fi routers can be vulnerable to hacking attempts, which may lead to unauthorized interception of data between your devices and websites. IP whitelisting is necessary to prevent hackers from infiltrating your router.

3. Securing IoT Devices

Deploying Internet of Things (IoT) devices involves various gadgets, such as CCTV cameras and household appliances. To safeguard these devices from potential hacking, you should apply IP whitelisting to ensure that only specific IP addresses can connect to and control them.

4. Managing Access to Website or Application Hosting Servers

Enhancing the security of hosting servers can be achieved through IP whitelisting. By doing so, only specific IP addresses can log in to manage your website or application.

5. Preventing Unauthorized Access to Staging Websites

During website development, testing is conducted in a staging environment. IP whitelisting enables you to restrict access to the testing website, ensuring that only authorized developers can access it.

6. Application Testing

When developing an application, it is essential to check the latest version to avoid issues with user interface, bugs, and other potential problems. IP whitelisting allows you to control access to the application during the testing process.

How to Whitelist IP Addresses in WordPress using a Plugin

One way to whitelist IP addresses in WordPress is by using the "Restricted Site Access" plugin. This is the easiest method as it does not require coding, making it suitable for beginners.

The function of the "Restricted Site Access" plugin is to limit access to the website while it is under development. To use the plugin, follow these steps:

1. Install Restricted Site Access

Log in to your WordPress Dashboard, then click on Plugins > Add New in the sidebar to access the plugin search.

In the plugin search, type "Restricted Site Access" in the search box. Then, click on Install Now on the plugin information.

Install Restricted Site Access

Once the installation is complete, don't forget to click Activate to enable the plugin.

2. Access Restricted Site Access Settings

In the WordPress sidebar, click on Settings > Reading

Scroll down until you find the "Restricted Site Access" settings. In the "Handle restricted visitors" section, you can choose what action to take against visitors who are not granted access to your website. These actions include:

  • Displaying a login page to the WordPress Dashboard.
  • Redirecting visitors to another URL you specify.
  • Showing a specific message.
  • Displaying a specific page on your website.

For the highest level of security, you can choose to display a message stating that the visitor does not have access to the website.

Access Restricted Site Access Settings

In the "Unrestricted IP addresses" section, there is a column to enter the IP addresses you want to whitelist. You can enter different individual IP addresses or specify a range of IP addresses. Additionally, you can easily add your current IP address by clicking Add My Current IP Address

After setting the desired configurations, click Save Changes

How to Whitelist IP Addresses in WordPress Using .htaccess File

You can also whitelist IP addresses by editing the .htaccess file. This method requires a few steps but allows you to whitelist specific IPs only for certain pages. In other words, this approach is more flexible compared to using plugins.

Here's how to whitelist IP addresses using .htaccess:

1. Log in to cPanel Hosting

Access cPanel by adding /cpanel at the end of your website's URL. Then, enter your username and password to log in to cPanel.

Log in to cPanel Hosting

You can find the cPanel username and password in the hosting activation email or inquire about it from the customer support of your hosting provider.

2. Open File Manager

On the cPanel main page, click on the File Manager menu.

Open File Manager

3. Access .htaccess

In the File Manager, navigate to the public_html folder and locate the .htaccess file.

Access .htaccess

Right-click on the file and choose Edit

Access .htaccess

Before you are taken to the file editor, you will be prompted to create a backup of the .htaccess file. Once you've done that, click Edit

Access .htaccess

4. Edit .htaccess

Once you have accessed the file editor, you need to add commands before the <If/Module> tag.

Edit .htaccess

To perform IP whitelisting, add the following commands:

order deny,allow
deny from all
allow from

Make sure you replace "" with the IP address you want to grant access to. If you want to add other IP addresses, simply type allow from followed by the respective IP address.

If you want to perform IP whitelisting for specific pages only, add the following command below:

RewriteEngine on
RewriteCond %{REQUEST_URI} ^(.*)?wp-login\.php(.*)$ [OR]
RewriteCond %{REQUEST_URI} ^(.*)?wp-admin$
RewriteCond %{REMOTE_ADDR} !^123\.123\.123\.123$
RewriteRule ^(.*)$ - [R=403,L]

In this example, the restricted pages are the WordPress login page accessible through the URL "/wp-admin" or the file "wp-login.php". If you want to control access to other pages, simply type the URL or the filename of the page after the command RewriteCond %{REQUEST_URI} ^

To specify the IP address you want to whitelist, type the IP address after the command RewriteCond %{REMOTE_ADDR} !

After you have finished adding the IP whitelist rules, click the Save Changes button in the top right corner of the file editor to save your IP whitelist settings.

Also Read: How to Block a Website Based on Country with .htaccess File.

How to Whitelist Email in cPanel

If your hosting service has SpamAssassin feature, you can whitelist IP to protect the email inbox of your hosting account from spam attacks. To do this, follow the steps below for whitelisting email:

1. Log In to cPanel

Access the cPanel login page and sign in to your account.

2. Open Spam Filters

Click on the Spam Filters menu.

How to Whitelist Email in cPanel

3. Open Additional Configurations

Scroll down until you find the "Additional Configurations" section, then click Show Additional Configurations.

Open Additional Configurations

Click on Edit Spam Whitelist Settings.

4. Add Email Address to the Whitelist

On the whitelist settings page, click Add A New 'whitelist_from' Item.

Add Email Address to the Whitelist

Type the email address that you want to allow to send emails to your inbox in the provided column.

Add Email Address to the Whitelist

Once you're done, click Update Whitelist to save the settings.

Also Read: How to Block Spam Emails Through cPanel

Ready to Whitelist IP?

Whitelisting IP is an effort to control access to networks and website settings by only allowing specific IP addresses. By whitelisting IP addresses, you can enhance the security of your computer network and website.

In this article, you have been guided through two methods of whitelisting IP addresses in WordPress, using plugins, and .htaccess. Additionally, you've learned how to whitelist email through cPanel. With this information, you can choose the method that suits your needs.

For website owners, IP whitelisting is just one way to secure website settings. To further enhance security, you need hosting services that offer comprehensive security features.

Post a Comment

Post a Comment