+91 - 9161069102 support@megaacshost.com

How to prevent Cross Site Scripting(XSS) injection attack in your Website?

In this article we’ll explain you about Cross-site scripting and steps to prevent Cross Site Scripting(XSS) attack in your Website.

What is Cross Site Scripting(XSS) Attack?

Cross-site Scripting (XSS) is an injection attack by the client-side. Most attackers target to execute malicious scripts in the browser of the victim by including malicious code in a legitimate web page or web application. The actual attack occurs when the victim visits the web page or web application that executes the malicious code.

How to prevent XSS attacks in your website? [STEP-BY-STEP]

Step::1 Login to cPanel and open File Manager section.

MEGA ACS HOST

Step::2 Go to public_html

MEGA ACS HOST

Step::3 Now find .htaccess file and right click over and choose the Edit option

MEGA ACS HOST

Step::4 Copy the code given below:

Options +FollowSymLinks
RewriteEngine On
RewriteCond %{QUERY_STRING} (<|%3C).*script.*(>|%3E) [NC,OR]
RewriteCond %{QUERY_STRING} GLOBALS(=|[|%[0-9A-Z]{0,2}) [OR]
RewriteCond %{QUERY_STRING} _REQUEST(=|[|%[0-9A-Z]{0,2})
RewriteRule ^(.*)$ index.php [F,L]
MEGA ACS HOST

Step::5 Paste this code in your .htaccess file and click on Save changes.

MEGA ACS HOST

For more information on Cross Site Scripting(XSS) Attack, head on over to the website or the forum!

If you’re looking for cheap web hosting. Please Contact to MEGA ACS HOST. Shared web hosting started at ₹ 599/Year.
Mega ACS Host: Website:- https://www.megaacshost.com/

Follow Us social media

Facebook Page– https://www.facebook.com/megaacshost/

Twitter Page– https://www.twitter.com/megaacshost

Leave a Reply

Your email address will not be published. Required fields are marked *