Visitor protection check
Does your website protect its visitors?
Four settings help keep visitors from being tricked or watched.
Scanning
Testing what the server really accepts.
All four are on.
These settings help keep visitors from being tricked or watched.
Not fully.
What is missing is marked below.
No, it doesn’t.
Visitors can end up on a connection that anyone nearby can read.
No clear answer.
We could not get a clear answer. Check the name, or try again in a few minutes.
Check the name.
Enter an address, such as yourcompany.com or portal.yourcompany.com
You’ve checked 100 websites today.
Need more? Talk to us.
Many websites checked this hour.
Try again in an hour. Need more? Talk to us.
One more try.
We could not confirm that you are a person. Turn off any content blocker for this page, then check again.
We don’t check this one.
Its owner asked us to leave it alone.
- Secure address
- Is everyone moved to it?AlwaysNot always
- Browsers
- Do they remember it?They rememberNot told toHSTS
- Other sites
- Can they show your pages as theirs?BlockedThey can
- Uploaded files
- Can one run as a program?BlockedIt might
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 reloadIf it shows an error, or the site stops, put the saved copy back and restart the server program at once.
The first part is the site for port 80. The last line goes in the site for port 443. On Debian and Ubuntu, first run: sudo a2enmod headers
<VirtualHost *:80>
ServerName example.com
ServerAlias www.example.com
Redirect permanent "/" "https://example.com/"
</VirtualHost>
Header always set Strict-Transport-Security "max-age=300"Then check the settings and reload.
sudo apachectl configtest && sudo apachectl gracefulIf it shows an error, or the site stops, put the saved copy back and restart the server program at once.
Both lines go in the frontend that listens on ports 80 and 443.
http-request redirect scheme https code 301 unless { ssl_fc }
http-after-response set-header Strict-Transport-Security "max-age=300" if { ssl_fc }Then check the settings and reload.
sudo haproxy -c -f /etc/haproxy/haproxy.cfg && sudo systemctl reload haproxyIf it shows an error, or the site stops, put the saved copy back and restart the server program at once.
The redirect is automatic. Add this line to the site.
header Strict-Transport-Security "max-age=300"Then check the settings and reload.
sudo systemctl reload caddyIf it shows an error, or the site stops, put the saved copy back and restart the server program at once.
On Windows Server 2019 or newer, select the site in IIS Manager and choose HSTS on the right. Tick Enable and Redirect Http to Https, and set Max-Age to 300.
First install a valid certificate on your own server. A free Cloudflare Origin certificate is enough. Then set the encryption mode to Full (strict), and switch on Always Use HTTPS under SSL/TLS, Edge Certificates. The header is on the same page, and its shortest setting is one month.
CloudFront: set Viewer protocol policy to Redirect HTTP to HTTPS in every behaviour. Load balancer: give the port 80 listener a redirect to HTTPS, port 443, code 301. The header is under the HTTPS listener's Attributes.
Open Domains and switch on Force HTTPS Redirect. Remove any other redirect, or the two may chase each other.
Open SSL/TLS Certificates and switch on Redirect from http to https. Switch on HSTS there later, without subdomains.
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 reloadIf it shows an error, or the site stops, put the saved copy back and restart the server program at once.
Put these in the site's settings for port 443. On Debian and Ubuntu, first run: sudo a2enmod headers
Header always set X-Content-Type-Options "nosniff"
Header always set X-Frame-Options "SAMEORIGIN"
Header always add Content-Security-Policy "frame-ancestors 'self'"Then check the settings and reload.
sudo apachectl configtest && sudo apachectl gracefulIf it shows an error, or the site stops, put the saved copy back and restart the server program at once.
Put these in the frontend.
http-after-response set-header X-Content-Type-Options nosniff
http-after-response set-header X-Frame-Options SAMEORIGIN
http-after-response add-header Content-Security-Policy "frame-ancestors 'self'"Then check the settings and reload.
sudo haproxy -c -f /etc/haproxy/haproxy.cfg && sudo systemctl reload haproxyIf it shows an error, or the site stops, put the saved copy back and restart the server program at once.
Put this in the site.
header {
X-Content-Type-Options nosniff
X-Frame-Options SAMEORIGIN
Content-Security-Policy "frame-ancestors 'self'"
}Then check the settings and reload.
sudo systemctl reload caddyIf it shows an error, or the site stops, put the saved copy back and restart the server program at once.
Select the site in IIS Manager, open HTTP Response Headers, and add each name with its value.
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
Content-Security-Policy: frame-ancestors 'self'Under Rules, create a response header transform rule for all requests, choose Set static, and add each name with its value.
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
Content-Security-Policy: frame-ancestors 'self'CloudFront: create your own response headers policy. The ready-made one also makes browsers insist on https for a year. Load balancer: add the headers under the HTTPS listener's Attributes.
Add these to the site's .htaccess file.
<IfModule mod_headers.c>
Header always set X-Content-Type-Options "nosniff"
Header always set X-Frame-Options "SAMEORIGIN"
Header always add Content-Security-Policy "frame-ancestors 'self'"
</IfModule>Open Apache & nginx Settings, find Additional headers, choose a custom value and paste these.
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
Content-Security-Policy: frame-ancestors 'self'