Tuesday, August 4, 2026

Headers Security Advanced & HSTS WP setup manually

Open the file for editing and paste the following snippet inside the  .htaccess file:

<IfModule mod_headers.c> Header always set Strict-Transport-Security "max-age=31536000; includeSubDomains; preload" env=HTTPS Header always set X-Frame-Options "SAMEORIGIN" Header always set X-Content-Type-Options "nosniff" Header always set Referrer-Policy "strict-origin-when-cross-origin" Header always set X-XSS-Protection "1; mode=block" Header always set Permissions-Policy "geolocation=(), microphone=(), camera=()" </IfModule>

Install Nikto on ubuntu to test Website security

sudo apt update

 sudo apt install nikto libnet-ssleay-perl


Basic Commands
  • Basic scan: nikto.pl -h http://www.example.com
  • Specify port: nikto.pl -h 192.168.1.1 -p 443
  • Save output: nikto.pl -h target.com -o output.txt

Headers Security Advanced & HSTS WP setup manually

Open the file for editing and paste the following snippet inside the  .htaccess file: <IfModule mod_headers.c> Header always set S...