MENTECHLet’s talkالعربية
Menu

Visitor protection check

Does your website protect its visitors?

Four settings help keep visitors from being tricked or watched.

Secure address
Is everyone moved to it?
Browsers
Do they remember it?HSTS
Other sites
Can they show your pages as theirs?
Uploaded files
Can one run as a program?

Try cloudflare.com github.com microsoft.com

This is a quick check, not a full security review. How we check

The details

How to send everyone to the secure address

Put the first part in place of the site's current block for port 80. If one block handles both ports, delete its listen 80 lines. The last line goes in the block for port 443, with a copy of any add_header lines from nginx.conf, or they stop working. Repeat it in any location block that has its own.

server {
    listen 80;
    listen [::]:80;
    server_name example.com www.example.com;
    return 301 https://$host$request_uri;
}

add_header Strict-Transport-Security "max-age=300" always;

Then check the settings and reload.

sudo nginx -t && sudo nginx -s reload

If it shows an error, or the site stops, put the saved copy back and restart the server program at once.

How to add the missing protection

Put these in the site's block for port 443, with a copy of any add_header lines from nginx.conf, or they stop working. Repeat them in any location block that has its own.

add_header X-Content-Type-Options nosniff always;
add_header X-Frame-Options SAMEORIGIN always;
add_header Content-Security-Policy "frame-ancestors 'self'" always;

Then check the settings and reload.

sudo nginx -t && sudo nginx -s reload

If it shows an error, or the site stops, put the saved copy back and restart the server program at once.

How we check Terms of use

CallWhatsAppLet’s talk