Beware the Hacked 404 Error Page on Your Joomla Website

We are currently having an increasing number of cases where the 404 page – just the 404 page – is hacked. For example, when someone visits a page that doesn’t exist (on the Joomla website), he is either redirected to an obscene website or he just sees some obscene content on the Joomla website (or his browser starts downloading malware).

The problem with this sort of hack is that is very hard to notice, especially on well-built websites with no dead links and on small websites with very few visitors. That hack can lurk there for a very long time without anyone seeing it, and even if someone sees it, most likely he’ll be just a casual visitor who will never report it and who will never visit the website again. This type of hack, in our opinion, is one of the most dangerous out there, simply because it secretly kills the website: the traffic will decrease week after week and nobody will ever know why!

So, how can one discover if his website has a hacked 404 page?

This is simple. All you need to do is to visit any non-existing link on your website and see what you’ll get. If you get the normal 404 page, then your website is not hacked. If you don’t, well, you know what it means!

Now, you should be aware that even if your 404 pages look OK- they might not be clean. It might be that these pages only pretend to look OK for normal, human visitors, but they show their nasty nature to Google (this is called the Google hack), so you will need to check how your 404 pages look from Google’s eyes (you can fetch a page as Google from Google Webmaster Tools).

OK, so how can you fix a hacked 404 page?

Unfortunately – Joomla 404 hacks are quite diverse, and nearly every single case we have seen so far and fixed was unique. But, here are some guidelines to narrow down the location of the problem:

  • Change your template: If, after changing your template, the problem disappears, then the hack is lurking somewhere in your template. If this is the case then it shouldn’t be that hard to fix.
  • Disable JavaScript: If you disable JavaScript on your browser and the problem no longer exists, then the problem is most likely somewhere in one of your global JavaScript files. Fixing the problem, in this case, consists of following the steps below:

    • Backup all your JavaScript files.
    • Delete them, one by one, and reload your page after each deletion. Once the page is clean, then it means you’ve just deleted the culprit.

    • Restore the deleted files and clean up the culprit.

    • This should fix the problem.

  • Disable SEF

    If you disable SEF and your 404 pages become clean, then it is very possible that the hack is somewhere in your .htaccess file. Either download a fresh copy of Joomla (matching your version) and overwrite your current .htaccess file with that of the downloaded copy, or manually clean up your .htaccess file if you have the technical skills to do so.

  • If all else fails…

    As we previously said, Joomla 404 hacks are pretty diverse, so, if none of the above methods worked for you, do not be afraid. You can always contact us and we can definitely help. In just a few hours, we’ll be able to locate the problem and completely clean up your website. We’re always just an email or a phone call away, and we won’t cost you an arm and a leg!

No comments yet.

Leave a comment