How Do You Know If Your Website Has Been Hacked?

By Adrian

Your site is behaving oddly, or a customer has told you something looks wrong. Now you’re wondering whether your website has been hacked, and what to do if it has.

This post covers the warning signs, a ten-minute check you can run yourself, and what to do first.

A man spray painting a city wall in the dead of night
Photo: Aleksandr Popov

What are the signs your website has been hacked?

Some signs are easy to spot. Others stay hidden unless someone looks.

Visible signs

  • Visitors get sent to a different website, or see pop-ups that you didn’t add.
  • Google shows a “This site may be hacked” warning in search results, or your browser warns people away.
  • Pages appear that you never created, often full of spam, strange products or text in another language.
  • Your host emails you about malware, or the site suddenly slows to a crawl.
  • You see administrator accounts you don’t recognise, or password reset emails you didn’t ask for.

Hidden signs

The quiet cases are harder. A hacker’s goal is often to stay put and use your site without being noticed.

  • Unexpected files. The clearest clue is usually in the file system, which is the set of files that make up your website on the server. Look for files that nobody on your team wrote. Common examples are PHP files (the code WordPress runs on) sitting in places they shouldn’t be, like the folder that holds your uploaded images. Files with random names, or files that changed when nobody edited the site, are worth a second look.
  • Content only search engines see. Some hacks hide from you. Google’s guidance on how to know if your site was hacked describes cloaking, where search engines see spam on a page that looks perfectly normal to you.

How can you check if your website has been hacked in ten minutes?

These checks catch the obvious cases. They won’t catch everything, but they’re a good start.

  1. Search for your own site. Type site:yourdomain.com.au into Google. Scan the results for pages you don’t recognise.
  2. Check Google Search Console. If your site is registered, open the Security Issues report. It lists any pages Google has flagged.
  3. Look at your users. Log in to WordPress and open the Users list. Remove nothing yet, but note any administrator you don’t know.
  4. Visit from a search result. Some hacks only affect people who arrive from Google. Search for your business on your phone and click through, instead of typing the address.
  5. Run a malware scan. If your site has a WordPress security plugin, run its scan and read the results. A clean scan is reassuring, but it isn’t proof, because scanners miss well-hidden files.

If anything looks wrong and you can’t explain it, treat it as a real problem until someone proves otherwise.

What should you do first if your website has been hacked?

The order matters. Here’s the approach we take.

  1. Take the site offline. A maintenance page or a suspended site stops visitors being harmed, and it stops further damage to your reputation and search ranking.
  2. Find how they got in before you fix anything. This is the step people skip. If you restore a backup without finding the entry point, the same hole stays open and the problem usually returns.
  3. Change your passwords. Do this for your hosting, WordPress, database and email, once the site is offline.
  4. Have a developer check the files and logs. They’ll look for new or changed files, odd code inside real files, unfamiliar users, and the server records of the request that let the attacker in.
  5. Clean up, close the gap and restore. Remove the damage, fix the weakness, bring back a clean copy if needed, and only then put the site back online. If Google flagged you, you’ll also need to request a review in Search Console.

Please don’t try to clean up a compromised site yourself unless you know what you’re looking for. A site that looks fixed can still carry a hidden file that lets the hacker straight back in.

How do you stop it happening again?

Most hacked sites are hacked through something out of date. Keep PHP, WordPress, your theme and your plugins updated, and remove anything you don’t use. We wrote about a recent example in our PHP2Shell guide.

Beyond updates, use strong passwords with two-factor login, keep backups stored away from the server, and limit who can reach your admin area. WordPress’s own guide to hardening WordPress covers the technical side.

Monitoring helps too. It tells you the same day when something changes, which is far better than finding out from a customer. Here’s how website monitoring works in practice.

When should you call a professional?

Call someone if any of these are true:

  • Google or your browser says your site may be hacked.
  • You find files, pages or admin users that nobody on your team created.
  • Visitors are being sent somewhere they shouldn’t be.
  • You can’t explain a sudden change, like a spike in traffic, a slowdown or new content.

Have a project in mind or just want a second opinion on your website? We'd love to hear from you.

Get in touch
Adrian
Hobart Website Design

Adrian Hewitt is a web designer and developer based in Hobart, Tasmania, with over 10 years experience building websites for local businesses. He runs Hobart Website Design.

adrianhewitt.com