Why is my website sending spam emails and how do I fix it
Summary
This guide helps you troubleshoot and resolve: Why is my website sending spam emails and how do I fix it. Follow the steps below to fix the issue.
Common Causes
Your website may look perfectly normal while quietly sending thousands of spam emails in the background. Attackers do not always deface pages or steal data; they often compromise outdated plugins, themes, or CMS components to turn your hosting account into a spam relay. When this happens, your business emails can start bouncing, legitimate messages land in spam folders, and your hosting provider may suspend your account to protect the reputation of shared mail servers. This guide explains how to identify the problem, clean your site, and restore trust with mail providers and search engines.
Quick Fix Steps
- Log in to your hosting control panel and check for account suspension notices or email sending limits.
- Change all administrator, FTP, and database passwords immediately.
- Update your CMS, themes, and plugins to the latest versions.
- Scan your website files for malicious code or unauthorised uploads.
- Remove any suspicious user accounts created without your knowledge.
- Review and tighten contact form settings to prevent abuse.
- Request a review from mail providers and search engines once your site is clean.
Detailed Instructions
1. Check Your Hosting Account Status
Log in to your hosting control panel and look for suspension warnings, bandwidth alerts, or email quota notifications. If your account has been suspended for spam activity, you will usually see a banner or message explaining the reason. Do not attempt to send large volumes of email until the underlying issue is resolved, as this can extend the suspension.
2. Change All Passwords
Attackers often gain access through stolen credentials. Change passwords for:
- Your hosting control panel
- Your CMS administrator account
- FTP or SFTP accounts
- Your website database
- Any connected email accounts
Use strong, unique passwords for each service. Avoid reusing passwords across different platforms.
3. Update Your CMS and Components
Outdated WordPress, Joomla, Drupal, or other CMS installations are a common entry point. Log in to your website administrator area and apply all available updates:
- Go to the Updates or Dashboard section.
- Update the core CMS software first.
- Update all installed themes and plugins.
- Remove any plugins or themes you no longer use.
After updating, check that your website still functions correctly.
4. Scan for Malicious Files
Use a reputable security scanner or malware removal tool to examine your website files. Look for:
- Recently modified PHP files you did not edit
- Unknown files in upload directories
- Encoded or obfuscated code in theme or plugin files
- Unauthorised administrator user accounts
If you are not comfortable editing code yourself, engage a web developer or security specialist to perform the cleanup.
5. Remove Unauthorised User Accounts
In your CMS admin panel, navigate to Users and review the list of accounts. Delete any accounts you do not recognise, especially those with administrator privileges. Attackers often create hidden admin accounts to maintain access after you change your password.
6. Secure Your Contact Forms
Spammers frequently exploit unprotected contact forms to send mail through your server. Take these steps:
- Add CAPTCHA or reCAPTCHA to all public forms.
- Enable rate limiting to restrict submissions per IP address.
- Validate and sanitise all form inputs on the server side.
- Disable email notifications for form submissions if they are not needed.
7. Review Email Logs
Check your hosting control panel's email logs to identify which scripts or accounts are sending messages. Look for high volumes of outgoing mail from unusual email addresses or PHP scripts. If you find a compromised script, disable it immediately and investigate how it was uploaded.
8. Request Removal from Blocklists
If your domain or IP address has been added to email blocklists, your messages will continue to bounce or go to spam even after cleanup. Use a blocklist lookup tool to check your status, then follow each provider's removal process. This often requires proving that your site is secure and that you have fixed the vulnerability.
9. Request a Search Engine Review
If search engines have flagged your site as compromised, visitors may see warning pages instead of your content. Once your site is clean, submit a review request through the relevant search engine's webmaster tools. This process can take several days.
Regular backups are essential. Before making significant changes, download a full backup of your website files and database so you can restore if something goes wrong.
Do not simply delete suspicious files without understanding how they got there. If you close the vulnerability but leave the attacker's access point open, the spam will likely return.
Troubleshooting
Emails Still Bouncing After Cleanup
Mail provider reputations take time to recover. Even after your site is clean, some emails may continue to bounce for a few days. Monitor your bounce messages and check blocklist status weekly until delivery returns to normal.
Cannot Access Hosting Control Panel
If your account has been suspended, you may lose access to email and file management. Contact your hosting provider's support team for assistance.
Website Redirects to Spam Pages
If visitors are being redirected to unrelated sites, your .htaccess file or database may have been modified. Restore these from a known clean backup and scan for malicious redirect code.
Contact Form Still Sending Spam
Disable the contact form temporarily while you implement CAPTCHA and input validation. Do not re-enable it until you are certain the vulnerability is patched.
If you host with us, you don't need to do this yourself — just Open a Ticket and our Brisbane team will get it sorted.
Still Having Issues?
💻 Open a Ticket