How to Protect a Website From Malware

Owning and designing websites is an exciting experience. The technology allows web designers to create interesting and dynamic websites. However, every website owner knows that security of her website is just as important as the fancy things it can do. Hackers target unprotected websites through password cracking programs, insecure PHP coding and outdated scripts. Malware code is injected into websites’ HTML and PHP files, causing web browsers to display hacked messages or advertisements instead of owner’s intended code. To protect a website, you must remove any vulnerable source that can be exploited by a hacker.

Instructions Website Protection

  1. Change the main website password (also known as the web hosting plan password) once a month. Use a combination of numbers, letters and symbols to form a secure password that is hard to guess or crack through hacking programs. For example, the password “S3409Uh29aa” is harder to guess than “sunshine29,
  2. Log in to each PHP script installed and in use (guestbook, blog, mailing list) and change their administrator passwords. Form difficult administrator password for each script that you’re using on the website.
  3. Update all scripts that are in use and are planned to be parts of the website in the future. Upgrade to latest available and stable versions by downloading them from the developers’ websites. Update any security patches available through the developer. Outdated PHP scripts have insecure coding and are often hacked and injected with malware code.
  4. Remove any scripts that are outdated and no longer in use. Delete the files off the web server or follow uninstall directions if available through your website’s control panel.
  5. Disable global directives and variables (which can be used to gain access to administrator panels and inject malware code) from your web hosting account. Alter the “.htaccess” file to secure the website and protect it from this common malice.
    Disable “php_globals”
  6. Log in to your website’s root directory using an FTP program. Select “Show hidden files” from the FTP display options.
  7. Locate a folder called “public_html” and open it.
  8. Download “.htaccess” from your website to your desktop.
  9. Right-click on the downloaded “.htaccess” file. Select “Open With – Notepad.”
  10. Type on the first line of the .htaccess file the following code: php_flag register_globals off  Save the file and upload back to “public_html.”

One thought on “How to Protect a Website From Malware

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s