Secure Your cPanel Account: cPanel is one of the most popular tools for managing websites. It provides easy access to settings for domains, files, emails, and more. But because of its widespread use, it is also a prime target for hackers. If someone gains access to your cPanel account, they can take over your website, steal data, or inject harmful malware.
To prevent this, you need to follow best practices to secure your cPanel account from hacking attempts. This guide walks you through easy-to-understand steps to secure your account and ensure your website remains safe.

1. Create a Strong Password to Secure Your cPanel Account
Passwords are the first line of defense for your cPanel account. A weak password makes it easy for hackers to break in using brute force or guessing techniques.
Steps to Create a Strong Password
- Use a mix of uppercase and lowercase letters, numbers, and special characters.
- Example:
M@nyC0mpl!c@tedP@55
- Example:
- Make your password at least 12 to 16 characters long.
- Avoid using predictable information like names, birthdays, or simple phrases like
mypassword123
. - Use a password manager like Dashlane or LastPass to generate and securely store passwords.
Pro Tip
Change your password every 2-3 months, especially if you notice unusual activity in your cPanel account.
2. Enable Two-Factor Authentication (2FA) to Secure Your cPanel Account
Two-Factor Authentication (2FA) adds an extra layer of security. Even if a hacker gets your password, they cannot access your account without a second authentication step, like a code from your phone.
How to Enable 2FA in cPanel
- Log in to your cPanel account.
- Go to Security > Two-Factor Authentication.
- Click Enable 2FA.
- Use a free authenticator app (such as Google Authenticator or Authy) to scan the QR code provided.
- Enter the code generated by the app to confirm.
Once set up, cPanel will require both your password and the code from your phone to log in.
3. Restrict Access with IP Whitelisting
IP Whitelisting allows only specific IP addresses to access your cPanel account. This ensures that even if someone has your login details, they cannot log in unless they are using an authorized IP.
How to Set Up IP Whitelisting
- Log in to your cPanel account.
- Go to Security > IP Blocker.
- Add the trusted IP addresses that you want to allow.
- Deny access to any suspicious or unknown IP addresses.
Pro Tip
If your internet connection uses a dynamic IP address (one that changes frequently), consider using a dynamic DNS service to update your IP automatically.
4. Update Your cPanel and Website Software
Outdated software is one of the main reasons hackers can break into accounts. Developers release updates to patch security flaws and bugs, so keeping everything up to date is crucial.
Steps to Update Your Software
- Enable Automatic Updates: Many hosting providers allow cPanel to update automatically. Contact your provider to enable this option.
- Update Applications Regularly: If you are using WordPress, Joomla, or any other CMS, update the core system, plugins, and themes regularly via the Softaculous App Installer in cPanel.
Outdated themes, plugins, or CMS installations are like open doors for hackers.
5. Monitor User Accounts and Permissions
If multiple people have access to your cPanel, it’s essential to manage user accounts carefully. Even a trusted account can become a security risk if it is unused or has excessive permissions.
Best Practices
- Regularly audit user accounts in cPanel.
- Delete any accounts that are no longer in use.
- Assign the least privilege necessary to each user. For example, an account that only needs to upload files should not have admin permissions.
6. Set Correct File Permissions
File permissions determine who can read, write, or execute files and directories. Incorrect permissions can allow hackers to access or alter your files.
Recommended File Permissions
- Files should generally have permissions of
644
. - Directories should have permissions of
755
.
How to Update File Permissions
- Log in to your cPanel account.
- Use the File Manager to navigate to the files or folders you want to secure.
- Right-click on a file or folder, select Change Permissions, and set the recommended values.
Avoid setting permissions to 777
, as this allows everyone (including hackers) to read, write, and execute files.
7. Enable cPHulk Brute Force Protection
cPHulk is a built-in cPanel tool that protects against brute force attacks by blocking multiple failed login attempts.
How to Enable cPHulk
- Log in to WHM (Web Host Manager).
- Navigate to Security Center > cPHulk Brute Force Protection.
- Enable cPHulk and configure the settings to block IPs after a certain number of failed login attempts.
This feature helps ensure that attackers cannot repeatedly guess passwords to break into your account.
8. Use Secure Connections (SSL/TLS)
Secure connections ensure that all data transferred between you and the server is encrypted, protecting it from interception.
How to Secure Your Connection
- Always access your cPanel using HTTPS (
https://yourdomain.com:2083
). - Install an SSL certificate for your website using the AutoSSL feature in cPanel.
9. Monitor Logs and Alerts
Regularly reviewing logs can help you identify unusual activity, such as repeated login failures or unauthorized changes.
How to Access cPanel Logs
- Go to Metrics > Raw Access Logs or Metrics > Errors.
- Look for patterns that indicate suspicious behavior, such as multiple failed logins or changes to critical files.
Set Up Alerts
Enable email notifications for important events, such as login attempts from unknown IPs. This allows you to take immediate action.
10. Backup Your Website Regularly
Backups are essential for recovering your data in case of a security breach. A robust backup strategy ensures that you can restore your website quickly without losing important information.
How to Automate Backups in cPanel
- Go to Files > Backup Wizard or Files > Backup.
- Schedule regular backups (daily, weekly, or monthly).
- Save backups in multiple locations, such as your local drive and a cloud storage service.
11. Use Additional Security Tools to Secure Your cPanel Account
cPanel offers several built-in and third-party tools to enhance security.
Recommended Tools
- Imunify360: Provides comprehensive protection against malware and unauthorized access.
- ModSecurity: Acts as a firewall to block malicious traffic and attacks.
- ConfigServer Security & Firewall (CSF): Enhances server security by providing advanced configurations.
12. Recognize and Avoid Phishing Scams
Phishing is a common method hackers use to trick you into revealing your cPanel login details.
How to Spot Phishing Attempts
- Check for misspellings or unusual sender addresses in emails.
- Avoid clicking on suspicious links or downloading attachments from unknown sources.
- Always log in to cPanel through your hosting provider’s official website.
13. Disable Unused Features to Secure Your cPanel Account
Unused features or services can act as potential entry points for hackers.
How to Disable Unnecessary Features
- Log in to WHM or cPanel.
- Identify features you don’t use (e.g., FTP if you always use SFTP).
- Disable them under the Feature Manager.
Read More: How to Disable Automatic Updates of MySQL
Conclusion
Securing your cPanel account requires vigilance and proactive measures. By following these steps, you can significantly reduce the risk of hacking attempts and ensure the safety of your website and data.
Regularly update your security practices to stay ahead of evolving threats. A secure cPanel account means peace of mind for you and a safe browsing experience for your website visitors.