• How to protect against .htaccess file being hacked?

    • views 1427

    First, Yandex started to mark the site as infected. That`s great that they noticed and informed me - developers said that the .htaccess file was infected. How can I protect the file from being hacked? P.S. I read your general advice, but did not find anything about .htaccess

    Solutions (2)
    Good afternoon. In the .htaccess file, you can set the rights to 444, limiting its editing and rewriting
    First of all, check all the mechanisms for viruses that you could possibly gain administrative access to your site with: access via FTP, or access to the administrative panel of the site. It`s likely that the site has been hacked through one of these mechanisms, if it is infected. Then check for CMS updates if you use something like WordPress or Joomla. Because there new ways to exploit access to popular CMS almost every week. Also, you need to upgrade to the latest versions of all modules the site is using. Then you change your password: for all FTP-users with access to the site`s files; to the administrative panel of the site; to the site database (and do not forget to register the new password to the database configuration site file). Finally, scan the website files for any dangers. This can be done, for example, with ai-bolit: https://revisium.com/ai/. If any danger exists, you should mercilessly delete content.
    Answers (2)
    There can be several reasons, the server may have been compromised as a whole or only your account, (they got your password for FTP access and modified your files.) Either way they got through vulnerabilities in the site.
    All of your account files should be protected from hacking, not just that one. Access can be obtained by guessing the password to ftp, or geting the password from the ftp if your computer has been infected with a trojan, or, most likely through a hole in your CMS. We recommend looking at the date the file was hacked, and examine the logs for that day. Maybe that way you`ll learn how unauthorized access was obtained.
We do our best for you!
Rate the article
or
Tell the world about it

Users (0) 0 of 5

  • In order to provide you with the best online experience this website uses personal data (cookies, IP, email, photo, name, website, etc). By using our website, you agree to our use of your personal data. More info we get commissions from the hostings, but our ratings are honest and the reviews are real.
  • Important

    We are in BETA. We need your help!

    Anonymous reviews are not allowed!

    Every month we add $50 to the account of a randomly selected user.*

    In addition, you will receive a free permanent link to your site after you leave an honest review!