What to do if your cPanel Web Hosting account was hacked



A hacked hosting account means that someone gained unauthorized access to a part of your hosting environment. Depending on the type of compromise, attackers may modify website files, send spam emails, modify DNS, or upload malicious scripts to your hosting account.

In some cases, the issue affects only a single website. In others, it may impact your entire cPanel account, including email services and hosted domains. Because malicious activity can continue in the background even if your website appears online, it is important to investigate the issue and secure the account as soon as possible.

This guide explains the most common signs of a compromised hosting account and the steps you can take from your side to scan, restore, and secure your hosting environment.


Signs your cPanel account may be compromised

Below are some of the most common signs customers notice before discovering a compromise.


Website-related signs:
  • Your website redirects visitors to unfamiliar or suspicious pages;
  • You are not able to access the back-end dashboard of your website;
  • A parking page, 403 Forbidden error, or Index Of/ page appears instead of the website;
  • Browsers display warnings such as "Deceptive site ahead" when opening the website;
  • CAPTCHA or verification pages appear even though you did not add them yourself;
  • New pages or search results appear in Japanese or other unfamiliar languages;
  • Your website title, homepage, or content changes unexpectedly;
  • A malware scanner reports infected or suspicious files;
  • You notice unfamiliar files or recently modified files in the hosting account;
  • Visitors report suspicious popups, redirects, or unusual website behavior.
Email-related signs:
  • Emails appear in the 'Sent' folder that you did not send;
  • Contacts report receiving spam from your email address;
  • You receive password reset messages or login alerts you do not recognize;
  • The mailbox suddenly reaches the outgoing email limit;
  • You receive many bounce-back messages for emails you never sent;
  • Emails, contacts, or mailbox folders disappear unexpectedly;
  • You notice email accounts you did not create;
  • DNS settings or email forwarding rules change without your knowledge.

If you notice one or several of these signs, continue reading the guide.


Step 1: Scan your account for malware

First of all, it is important to identify the scope of the compromise. It is recommended to scan the hosting account for malware and review the detected files carefully.

Below are the available malware scanning options depending on your hosting plan: 

ImunifyAV (Stellar/Stellar Plus/Reseller hosting)

ImunifyAV is a malware scanner available in cPanel on Stellar, Stellar Plus, and Reseller Hosting plans. It can help detect suspicious or infected files inside your hosting account, including malicious scripts, phishing pages, backdoors, and other suspicious files commonly associated with compromised websites.

The tool can be accessed from cPanel >> Security section >> ImunifyAV.



After reviewing the scan results, proceed to the 'Additional checks and scanning methods' section.


Imunify360 (Stellar Business)

Stellar Business hosting plans include Imunify360, an advanced malware protection and monitoring tool.

The tool can be accessed from cPanel >> Security section >> Imunify360.


After reviewing the scan results, proceed to the 'Additional checks and scanning methods' section.


Additional checks and scanning methods

Keep in mind that malware scanners may not detect all types of malicious activity automatically. For example, suspicious cron jobs, unauthorized accounts, or compromised local devices often require manual review.

For this reason, it is recommended to review the hosting account more broadly before proceeding with cleanup or restoration.

You can start with the following checks:

You can also consider additional scanning methods:

  • Virus Scanner feature in cPanel;
  • Free online scanners such as Sucuri;
  • Contact Support Team if you would like to perform an additional server-side malware scan with a report or quarantine option.

During manual file review, it is also important to recognize common signs of compromised files and suspicious modifications inside the hosting account.


Common indicators of compromised files


When reviewing website files or backups, pay attention to the following indicators. Each indicator below includes an example screenshot, which you can expand for reference.







Additional indicators for WordPress websites:





The examples above describe some of the most common indicators of compromised files. However, malicious files and unauthorized modifications may appear differently depending on the type of malware involved.

Review suspicious files and malware scan results carefully before proceeding with cleanup or restoration.


Step 2: Choose a recovery method

Once the affected websites, files, or services are identified, you can choose a recovery method depending on the type and scope of the compromise.

Consider the following options:


Recovery method: Restore a backup

Restoring a clean backup is often the fastest and safest way to recover a compromised hosting account.

In most cases, a full account restoration is recommended instead of restoring only selected files or folders. Partial restores may leave behind hidden malicious files, infected cron jobs, or other compromised data outside the website directory.

Before restoring a backup, make sure that it was created before the compromise occurred. Otherwise, the infection may return together with the restored data.

The following backup restoration options are available for shared hosting plans: 

  • AutoBackup (Stellar Plus/Business)
  • Server backup via Support (for Stellar/Reseller hosting)
  • Partial & local backups
  • What to do if no malware-free backup is available

  • AutoBackup (Stellar Plus/Business)

    Customers using Stellar Plus and Stellar Business hosting plans can use the AutoBackup tool in cPanel to restore a previous version of the hosting account or review backup contents before restoration, if a backup is available.

    The tool can be accessed via cPanel >> Exclusive for Namecheap Customers section >> AutoBackup.



    Once the data is restored, continue with 'Step 3: How to prevent reinfection after cleanup'.


    Server backup via support (Stellar/Reseller hosting)

    The AutoBackup plugin is not available on Stellar and Reseller Hosting plans.

    If the hosting account or websites were functioning correctly before the compromise, you can contact our Support Team with the request to search for an available server backup.

    Before requesting restoration, it is still recommended to review any available local/manually generated backups and confirm approximately when the compromise may have started.

    If server backups are available, our Support Team may also be able to:

    • Provide a backup download link so the archive can be reviewed locally;
    • Restore specific directories or databases upon request instead of performing a full account restoration.

    Important information about server backups:

    • Weekly backups are created for shared hosting accounts for maintenance purposes only;
    • Backup generation is possible only when the hosting account contains fewer than 200,000 inodes;
    • Because backup availability is not guaranteed, we strongly recommend maintaining your own backups whenever possible.

    After completing the recovery process, continue with the account hardening recommendations in 'Step 3: How to prevent reinfection after cleanup'.


    Partial & local backups

    If full account backups are unavailable, you can also review local or partial backups that may contain clean website files, databases, or account data.

    Possible backup sources include:

    • Local backups stored on your computer or external storage;
    • Backups created through the cPanel Backup tool;
    • Backups generated by CMS applications or plugins (for example, WordPress backup plugins);
    • Softaculous backups;
    • Exported website databases or downloaded website files.

    Before restoring a local backup:

    1. Review it for possible signs of compromise. Pay attention to the indicators described in the 'Common indicators of compromised files' section of the guide.
    2. Create a backup of the current website/account state.

    Tip: The following guides may help when restoring partial backups:

    In some cases, only a partial clean backup of the website may be available while the rest of the hosting account remains compromised. In this situation, you can consider:

    • Resetting the hosting account and restoring only the clean website files or databases afterward;
    • Moving the clean version of your website to a different cPanel account to reduce the risk of reinfection from compromised account data.

    Hosting account resets during malware incidents can be requested through our Support Team.


    What to do if no malware-free backup is available

    In some cases, clean backups may not be available. This can happen for different reasons, for example:

    • The infection existed for a long time before being detected;
    • Backups were not generated because the account exceeded backup limits;
    • The hosting account was recently migrated.

    In this situation, you can consider the following options:

    1. Review local or partial backups as described above;
    2. Proceed with manual malware cleanup using the steps from the 'Clean malware manually' section;
    3. Contact our Support Team to check whether additional recovery options are available.

    Recovery method: Clean malware

    If you decide to clean the hosting account manually or use automated cleanup tools instead of restoring a full backup, secure access to the account first.

    Recommended actions:

    These steps help reduce the risk of reinfection during or after cleanup. Once done, proceed with one of these options: 

    Automatic cleanup with SiteLock

    SiteLock can automate part or all of the malware cleanup process instead of performing a fully manual recovery.

    Please note that SiteLock scans and cleans only the selected website or website directory rather than the entire hosting account.

    Because of this, additional manual cleanup may still be required if earlier checks identified:

    • Malicious files outside the main website directory;
    • Suspicious cron jobs;
    • Compromised email accounts;
    • Unauthorized FTP accounts;
    • Other account-level indicators of compromise.

    The following SiteLock plans are available depending on the type and severity of the compromise.


    After the website is restored and secured, you can continue with 'Step 3: How to prevent reinfection after cleanup'.


    Clean malware manually

    Important: Before making any changes, create a backup of the current website and account data.

    The recommendations below are intended as general guidance. You are responsible for deciding which actions to take and for verifying that any changes are appropriate for your website before applying them.

    If no clean backup is available, or you prefer handling the cleanup manually, you can remove suspicious content and revert unauthorized changes inside the hosting account.

    During the checks described in 'Step 1: Scan your account for malware', you should have already identified suspicious files, unauthorized access, malicious scripts, modified settings, or other signs of compromise through malware scans and manual review.

    The sections below explain how to remove or correct the identified threats manually.


    Be aware that all the actions that were performed to mitigate the issue with the hacked account still cannot guarantee a 100% result. In some cases, it may be necessary to contact professionals who specialize in security.

    After completing the recovery process, continue with the account hardening recommendations in 'Step 3: How to prevent reinfection after cleanup'.


    If your WordPress site is hacked

    WordPress has its own dedicated cleanup flow, use these guides instead of or alongside the steps above:

    After the website is restored and secured, continue with 'Step 3: How to prevent reinfection after cleanup'.


    If you notice suspicious cPanel email activity

    Suspicious email activity may indicate either mailbox compromise, spoofing attempts, unauthorized website mail activity, or broader hosting account compromise.

    Before proceeding with email-related troubleshooting, it is recommended to complete the malware scanning and account security checks described in the 'Step 1: Scan your account for malware' section of this guide.

    For detailed troubleshooting and recovery steps to suspicious email activity, refer to our dedicated guide: What to do if you notice suspicious email activity on cPanel Shared Hosting.


    Step 3: How to prevent reinfection after cleanup

    After the cleanup or restoration is completed, it is important to secure the hosting account and reduce the risk of future compromise.

    Recommended actions:

    • Change passwords for all hosting-related services periodically;
    • Enable two-factor authentication where possible;
    • Keep CMS applications, plugins, themes, and scripts updated;
    • Remove unused software, plugins, themes, email accounts, FTP accounts, and administrator users;
    • Maintain regular backups;
    • Monitor the hosting account regularly for suspicious activity;
    • Consider using additional security tools and malware monitoring services.

    The following guides may help improve long-term account and website security:

    Following these recommendations can significantly reduce the risk of future compromise and help detect suspicious activity earlier.

    If you have any questions or need assistance, feel free to get in touch via our Help Desk

    Please note that, as a hosting provider, we do not specialize in malware analysis or manual malware removal. While we will review your situation and assist where possible, some of the checks and steps described in this guide may need to be performed independently or by a qualified security professional. You can review our support boundaries here.

    Updated
    Viewed
    146 times

    Need help? We're always here for you.

    notmyip