Skip to content
FunnelGuard

Fix guide by FunnelsGuard

Website defaced: homepage replaced, how to detect and fix it

OPS-144High impactDetectedBy FunnelGuardPublished Updated
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.

What a defaced homepage does to your funnel
  1. Ad clickVisitor arrives from your campaign
  2. HomepageReplaced with attacker's page
  3. Offer / formNever seen
  4. Lead or saleNot recorded

The break is at the first page. Everything after it never gets a visitor.

Leads per day before and during a defacementExample numbers
Leads per day before and during a defacement (example)Normal day: 20 leads/day; Day 1 defaced: 2 leads/day; Day 2 defaced: 0 leads/day; Day 3 defaced: 0 leads/day081520200Normal dayDay 1 defacedDay 2 defacedDay 3 defacedleads/day

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.

Quick defacement checks
  • 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.
See what the server really returnsbash
curl -s -A "Mozilla/5.0" https://www.example.com/ | head -n 40
# Compare the output with a known clean copy of the page

How to fix it

Recover from a defacement
  1. Take the site offline or into maintenance mode

    Stop sending paid traffic to it. Pause ad campaigns pointing at the affected pages.

  2. 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.

  3. 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.

  4. Restore a clean backup

    Pick a backup from before the change. If you are unsure of the date, go further back, then update everything.

  5. 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.

  6. 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.

Restoring on your platform
  1. Restore from backup

    Use your host's backup tool or a backup plugin to restore files and database from a clean date.

  2. Reinstall core and plugins

    Under Dashboard > Updates, reinstall WordPress core. Delete and reinstall plugins and themes from trusted sources rather than keeping existing copies.

  3. Clean users and keys

    Under Users, remove unknown administrators. Replace the salts in wp-config.php so all sessions are logged out.

How to confirm it's fixed

Confirmation checks
  • 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.
Homepage state

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

Prevention
  • 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.

Does FunnelGuard catch this?

Detected

FunnelGuard checks for this today.

How: Asserts and DOM hash.

Stop finding out from your customers

FunnelGuard runs your real forms and checkouts on a schedule, checks the tracking and the leads behind them, and alerts you once, with a screenshot. Try any paid plan free for 3 days.