On this page
What this issue is
Defacement means someone without permission has changed what your site shows. Usually the homepage is overwritten with a message, a logo, a political statement or a redirect-style page. The attacker gets in through something weak: an outdated plugin or theme, a stolen password, a leaked FTP or hosting login, or a vulnerable script on the server.
Why it costs you leads or sales
Every visitor who lands on the replaced page sees no offer, no form and no checkout. Paid traffic keeps arriving and you keep paying for those clicks. Trust takes a hit too: people who see a hacked page rarely come back. Browsers and search engines may also start warning visitors, which makes things worse and takes longer to clear.
- Ad clickVisitor arrives from your campaign
- HomepageReplaced with attacker's page
- Offer / formNever seen
- Lead or saleNot recorded
The break is at the first page. Everything after it never gets a visitor.
Example: illustrative numbers for a site that normally gets 20 leads a day from its homepage and is defaced for three days.
How to check if your site has it
Start with the obvious, then check what a normal browser might hide from you.
- Open your homepage in a private window on mobile data, not your office network.
- Open it from a second device or ask a colleague in another location to look.
- View the page source (Ctrl+U or Cmd+Option+U) and look for text, scripts or iframes you did not add.
- Check inner pages too: landing pages, contact, checkout.
- Search Google for site:yourdomain.com and look at the titles and descriptions shown.
- Check the last modified dates of index.php, index.html and theme files in your hosting file manager.
- Look at your hosting panel and CMS for admin users you do not recognise.
curl -s -A "Mozilla/5.0" https://www.example.com/ | head -n 40
# Compare the output with a known clean copy of the pageHow to fix it
Take the site offline or into maintenance mode
Stop sending paid traffic to it. Pause ad campaigns pointing at the affected pages.
Make a copy of the hacked state
Download the files and database before cleaning. You will need them to find how the attacker got in.
Change every credential
Reset hosting, FTP/SFTP, database, CMS admin, email and API keys. Use unique strong passwords and turn on two-factor authentication where offered.
Restore a clean backup
Pick a backup from before the change. If you are unsure of the date, go further back, then update everything.
Remove the way in
Update or delete the vulnerable plugin, theme or script. Delete admin users you do not recognise and unknown files, especially in upload folders.
Ask your host for help
Hosts can often tell you from server logs which file or login was used, and may run a malware scan.
Restore from backup
Use your host's backup tool or a backup plugin to restore files and database from a clean date.
Reinstall core and plugins
Under Dashboard > Updates, reinstall WordPress core. Delete and reinstall plugins and themes from trusted sources rather than keeping existing copies.
Clean users and keys
Under Users, remove unknown administrators. Replace the salts in wp-config.php so all sessions are logged out.
Revert the theme
In Online Store > Themes, open the theme's Actions menu and use Edit code or the version history to restore a clean version, or publish a clean duplicate.
Review staff and apps
Under Settings > Users and permissions remove unknown staff. Uninstall apps you do not recognise and reset passwords.
Restore a backup
In Site settings > Backups, restore a version from before the change, then publish.
Review members and integrations
Remove unknown workspace members, reset passwords and revoke API tokens you do not use.
Restore a site version
Open Site History in the editor and restore a version from before the change.
Secure the account
Change your password, turn on two-step verification and remove unknown contributors under Roles & Permissions.
Revert content
Restore the page from Pages > page settings if available, or re-create it from a known clean copy.
Secure access
Change your password, enable two-factor authentication and remove unknown contributors under Permissions.
Redeploy from version control
Rebuild from a clean commit rather than editing files on the server, then rotate deploy keys and server passwords.
Find the entry point
Review web server and access logs for the first request that changed the file, then patch that hole.
How to confirm it's fixed
- Homepage and key landing pages show your real content from several networks and devices.
- Page source contains no unknown scripts, iframes or links.
- No unknown admin users or files remain.
- Forms submit and the test lead reaches your inbox or CRM.
- Your tracking tags fire again on the homepage and thank-you pages.
- Search Console shows no security issues or manual actions.
Defaced
- Attacker message instead of your offer
- Forms and buttons missing
- Ad clicks wasted
- Visitors may see browser warnings
Restored and hardened
- Real homepage back
- Entry point closed, credentials rotated
- Backups and updates in place
- Monitoring alerts on any change
How to prevent it happening again
- Keep CMS, themes and plugins updated, and delete ones you do not use.
- Use unique strong passwords and two-factor authentication for hosting, CMS and email.
- Give each person their own account with the lowest role they need.
- Use SFTP instead of plain FTP.
- Keep automatic off-site backups and test a restore.
- Set file permissions correctly and disable file editing in the CMS dashboard where possible.
- Monitor the homepage so a change is flagged in minutes, not days.
How FunnelGuard handles this
FunnelGuard detects this today. A robot visitor loads your pages on a schedule and runs assertions, checks that expected content is present (for example your headline, form or button). It also compares a DOM hash, a fingerprint of the page structure, so a page that has been swapped for something else stands out. When a check fails it is re-checked from a second region, then one alert goes out by email, Slack, Teams, WhatsApp, webhook or PagerDuty, with a screenshot and a likely cause.
This is not a malware scanner and will not find every hidden hack on your server. It tells you quickly when the page your customers see is no longer the page you expect. The Free plan covers 1 site and 2 journeys with daily checks and no card, and paid plans have a 3-day free trial.
Questions people ask
What does it mean when a website is defaced?
It means an attacker has changed what your site displays without permission, usually by replacing the homepage with their own page or message. It happens through weak passwords, outdated plugins or themes, or a vulnerable server.
Why was my homepage replaced with a hacker message?
Most often an attacker used an outdated plugin or theme, a stolen or guessed password, or a leaked hosting login to overwrite your homepage file. Server logs from your host usually show which route they used.
How do I fix a hacked homepage?
Pause ads, save a copy of the hacked files, change all passwords and keys, restore a clean backup, then update or remove the vulnerable plugin, theme or account. Finally check for rogue admin users and unknown files.
Is restoring a backup enough after my website was hacked?
Not by itself. If the hole that let the attacker in stays open, they can return. Update software, remove unknown users and files, and rotate every credential after restoring.
How can I tell if my website was hacked?
Look at the homepage from another device and network, view the page source for unknown scripts or links, check admin users and file modification dates, and check Google Search Console for security warnings.
How quickly will I know if my homepage changes?
Only as fast as your checks run. Owners often learn from a customer or a drop in leads. An automated monitor that checks the page on a schedule can alert you within one check interval.
Will Google warn visitors if my site was defaced?
Possibly. If Google detects hacked content or malware it can show warnings in search or in the browser, and Search Console may list a security issue. After cleaning, you can request a review there.
Related issues
- OPS-138Google Safe Browsing 'Deceptive site' warningFix guide
- OPS-139Chrome 'dangerous site' red screen on funnelFix guide
- OPS-148Rogue admin user createdFix guide
- OPS-149Backdoor files (web shells) on serverFix guide
- OPS-150Search Console security issues / manual actionsFix guide
- OPS-142Japanese keyword / pharma / casino spam pages injectedFix guide