XSS attack on my website

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Wilford24
    New Member
    • May 2024
    • 1

    XSS attack on my website

    Greetings, I run a tech blog site and its a PHP-based website. But there is a XSS attack occurs on my website. So for that reason, the traffic of my site is gradually decreasing. Here is my website. Can anyone please suggest what to do? How can I save my website?
  • developercat
    New Member
    • May 2024
    • 24

    #2
    Here are things you can do to help minimize the impact of an XSS attack.

    Start by validating and sanitizing all user inputs to ensure no malicious scripts can be executed. Use functions like `htmlspecialcha rs()` or `htmlentities() ` in PHP to escape special characters.

    Implement Content Security Policy (CSP) headers to restrict the sources from which scripts can be loaded.

    Ensure your PHP and all third-party libraries are up to date with the latest security patches.

    Conduct regular security audits and consider using web application firewalls (WAF) to provide an additional layer of protection.

    Comment

    • marianklux
      New Member
      • May 2024
      • 5

      #3
      You need ddos protected server to stop the attacks Layer 7 Protection its not cheap tho.
      I had the same attacks like 1 year ago then found this provider that offers Layer 7 ddos protection without other cost.
      Check them out here

      All the best

      Comment

      • dev7060
        Recognized Expert Contributor
        • Mar 2017
        • 655

        #4
        Greetings, I run a tech blog site and its a PHP-based website. But there is a XSS attack occurs on my website. So for that reason, the traffic of my site is gradually decreasing. Here is my website. Can anyone please suggest what to do? How can I save my website?
        You can start by following the best practices.

        Comment

        Working...