Viewing 8 replies - 1 through 8 (of 8 total)
  • There are multiple ways to do this, one of the generic ways is using the server access filename (aka. HTAccess for Apache), you’ll basically need to add in your .htaccess file the lines recommended in those articles and wrapping them between these tags.

    <ifModule mod_headers.c>
    ...
    </ifModule>

    Read how to manipulate HTTP headers with htaccess.

    Thread Starter ModularBase

    (@modularbase)

    I enter this in the .htaccess file on my site, as suggested…

    <ifModule mod_headers.c>
    X-XSS-Protection: 1; mode=block
    X-Frame-Options: SAMEORIGIN
    X-Content-Type-Options: nosniff
    </ifModule>

    …it gives an Internal Service Error.

    Thread Starter ModularBase

    (@modularbase)

    Solved the error…

    Set this in .htaccess…

    <ifModule mod_headers.c>
    Header set X-XSS-Protection "1; mode=block"
    Header always append X-Frame-Options SAMEORIGIN
    Header set X-Content-Type-Options: "nosniff”
    </ifModule>

    In the Recommendations after performing Malware Scan, then followig recommendation link, this line…
    Header set X-Content-Type-Options: nosniff”
    …is missing the first quotation marks in front of nosniff.
    This could be corrected.

    Excellent plugin. Works like a charm.

    Thanks for your speedy assistance.

    Articles update with your suggestions, thanks for the feedback.

    Thread Starter ModularBase

    (@modularbase)

    You’re welcome. Again… very excellent plugin.

    I put the suggested code above as follows into the .htaccess file located in my sites root directory but the recommendation warning for my site still appears in the Sucuri / Malware Scan / Website Details at the bottom of the page, suggesting I still need to insert the code.

    <ifModule mod_headers.c>
    Header set X-XSS-Protection “1; mode=block”
    Header set X-Content-Type-Options “nosniff”
    </ifModule>

    What am I overlooking?

    Opp, I posted a new topic given this one is marked resolved.

    Thanks for this…

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Recommendations for X-XSS-Protection , X-Frame-Options, X-Content-Type nosniff’ is closed to new replies.