September 2018
M T W T F S S
 12
3456789
10111213141516
17181920212223
24252627282930

Categories

September 2018
M T W T F S S
 12
3456789
10111213141516
17181920212223
24252627282930

Hotlink Protection

Enable Hotlink Protection on Apache

If your WordPress site is running on Apache, all you need to do is open the .htaccess file in your site’s root directory (or create it) and add the following:

RewriteEngine on RewriteCond %{HTTP_REFERER} !^$ RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?yourdomain.com [NC] RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?google.com [NC] RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?bing.com [NC] RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?yahoo.com […]

Implementing Content Security Policy in Apache

Header unset Content-Security-Policy Header add Content-Security-Policy “default-src ‘self'” Header unset X-Content-Security-Policy Header add X-Content-Security-Policy “default-src ‘self'” Header unset X-WebKit-CSP Header add X-WebKit-CSP “default-src ‘self'”

You may also be interested in adding those headers:

Header set X-Content-Type-Options “nosniff” Header set X-XSS-Protection “1; mode=block” Header set X-Frame-Options “DENY” Header set Strict-Transport-Security “max-age=631138519; includeSubDomains”

 

 

 

Along […]

HTTP Strict Transport Security for Apache, NGINX and Lighttpd

HTTP Strict Transport Security (often abbreviated as HSTS) is a security feature that lets a web site tell browsers that it should only be communicated with using HTTPS, instead of using HTTP. This tutorial will show you how to set up HSTS in Apache2, NGINX and Lighttpd. It is tested with all mentioned webservers, NGINX […]