Explain how you can stop your website getting hacked?
By adapting following method you can stop your website from getting hacked
Sanitizing and Validating users parameters: By Sanitizing and Validating user parameters before submitting them to the database can reduce the chances of being attacked by SQL injection
Using Firewall: Firewall can be used to drop traffic from suspicious IP address if attack is a simple DOS
Encrypting the Cookies: Cookie or Session poisoning can be prevented by encrypting the content of the cookies, associating cookies with the client IP address and timing out the cookies after some time
Validating and Verifying user input : This approach is ready to prevent form tempering by verifying and validating the user input before processing it
Validating and Sanitizing headers : This techniques is useful against cross site scripting or XSS, this technique includes validating and sanitizing headers, parameters passed via the URL, form parameters and hidden values to reduce XSS attacks