In Salesforce, for security purposes and to help protect the Salesforce Org from unauthorized access, we can specify IP addresses so users can log in to Salesforce org without any interruption that’s the purpose of IP ranges.
In this Salesforce tutorial, we will learn How to Restrict Login IP Addresses in Profiles in Salesforce, and additionally, we will see step-by-step how to set IP addresses in profiles and how to restrict users in Salesforce Lightning and Salesforce Classic.
Login IP Ranges in Salesforce
What login access by IP ranges in Salesforce?
IP ranges define a list of IP addresses from which users can easily log in to Salesforce Org, If any user tries to log in from outside these IP Addresses then the access will denied by Salesforce.
What is meant by restricting login IP addresses in the profile?
We can control access to the user level by specifying allowed IP range addresses on the user profile when we have defined the IP address restriction on the profile. If a user tries to log in from any other IP address, it will be denied.
You can manage valid IP addresses in your profile if you are using the following Salesforce editions.
- Enterprise Edition.
- Unlimited Edition.
- Performance Editon.
- Developer Edition.
How to Set IP Address in Profile in Salesforce Lightning.
Using the following steps you can Set the IP address in the profile.
1. On the home page, Click on the “Gear icon”, then select “Setup” from the dropdown.
2. On the setup page, “Quick Find Box” -> Search ” Profiles” -> Click on “Profiles”.

3. Select the Profile on which you want to set IP Ranges.

4. Scroll down you will get the option Login IP Ranges, Click on New.

5. Fill the required fields and click on Save.
- Start IP Address – Enter the valid IP Address.
- End IP Address – In the end field IP Address should be greater than the start field.
- Description – It is optional, if there are multiple IP addresses then here you can mention details about part of the network.
- The start and end IP address must be in the IPV4 range.

This is how you can set the IP address to a Profile in Salesforce Lightning.
How to Enable Restrict Login IP Addresses in Profiles in Salesforce Lightning
After setting the IP address, you have to enable Restrict IP address user in Profile.
1. Setup -> In Quick Find Box -> Search “Session Setting” -> Click on “Session Setting“.

2. To Restrict the user login from outside IP address, Activate “Enforce login IP ranges on every request“. -> Save it.

This is how we can restrict profile users from logging in from outside IP addresses.
How to Set IP Address in Profile in Salesforce Classic
Using the following steps, you can set the IP address in the profile.
1. Go to Setup -> In Quick Find Box -> Search “Profiles” -> Click on “Profiles“.

2. Select the Profile on which you want to set the IP Address.

3. Fill up the necessary fields. And Click on Save
- Start IP Address – Enter the valid IP Address. Ex. 132.0.0.0
- End IP Address – In the end field, the IP Address should be greater than the start field. Ex. 132.255.255.255
- Description – It is optional, if there are multiple IP addresses then here you can mention details about part of the network. Ex “Health Cloud”
- The start and end IP address must be in the IPV4 range.

This is how you can set an IP Address in your profile in Salesforce Classic.
How to Enable Restrict Login IP Addresses in Profiles in Salesforce Classic
After setting the IP Address, you need to Activate to restrict the user from logging from outside IP ranges.
1. Go to Setup -> In Quick Find Box -> Search “Session Setting” -> Click on “Session Setting“.

2. Click on “Enforce login IP ranges on every request” and enable it.

This is how we can Restrict Login IP Addresses in Profiles, and after enabling this, the user cannot log in to Salesforce Org. from outside of the IP address.
Conclusion
In this article, we have learned about what a trusted IP address is and what is meant by restricting the IP address in a profile.
In addition, we have seen how to set the IP address in the profile and how to enable the option to restrict a user from logging from an outside IP address in Salesforce Lightning and Salesforce Classic.
You may like to read:
- How to Restrict Login Hours in Salesforce
- How to View and Edit Login Hours in Salesforce
- How to Restrict Users From Switching Salesforce Lightning to Salesforce Classic
- How to Restrict Reports Access in Salesforce
- How to Set IP Addresses at Org Level in Salesforce
I am Bijay Kumar, the founder of SalesforceFAQs.com. Having over 10 years of experience working in salesforce technologies for clients across the world (Canada, Australia, United States, United Kingdom, New Zealand, etc.). I am a certified salesforce administrator and expert with experience in developing salesforce applications and projects. My goal is to make it easy for people to learn and use salesforce technologies by providing simple and easy-to-understand solutions. Check out the complete profile on About us.