Configuring Website Security Settings
Essential security measures to protect your website from common threats — covering HTTPS, security headers, login protection, file permissions, and how to conduct regular security audits.
1. Website Security Fundamentals
Website security is not a single setting but a layered defence strategy. No single measure is 100% foolproof — the goal is to make your site a harder target than the next. Think in terms of these layers:
- Transport security — encrypt data in transit (HTTPS/TLS)
- Application security — sanitise inputs, use security headers, keep software updated
- Access control — limit who can log in, what they can do, and from where
- Monitoring — detect and respond to unusual activity quickly
Canadian Context
Under PIPEDA, you are required to implement security safeguards appropriate to the sensitivity of the personal data you hold. A data breach involving personal information must be reported to the Privacy Commissioner of Canada.
2. Enabling HTTPS and SSL/TLS
HTTPS encrypts all traffic between your visitor's browser and your server. Without it, passwords, form data, and session tokens travel in plain text — readable by anyone on the same network.
Steps to enable HTTPS:
- Obtain an SSL/TLS certificate — free via Let's Encrypt (auto-renews every 90 days), or from your hosting provider
- Install the certificate on your server or enable it through your hosting control panel (cPanel, Plesk, etc.)
- Redirect all HTTP traffic to HTTPS with a 301 redirect
- Update all internal links and asset URLs from
http://tohttps:// - Enable HSTS (HTTP Strict Transport Security) to prevent downgrade attacks
On Netlify and Similar Platforms
Netlify, Vercel, and Cloudflare Pages provision Let's Encrypt certificates automatically on custom domains. Enable "Force HTTPS" in your domain settings — no manual configuration needed.
3. Security Headers
HTTP security headers instruct browsers on how to behave when rendering your pages. They are one of the most cost-effective security improvements you can make.
| Header | Purpose | Recommended Value |
|---|---|---|
| X-Content-Type-Options | Prevents MIME-sniffing | nosniff |
| X-Frame-Options | Prevents clickjacking | DENY or SAMEORIGIN |
| Referrer-Policy | Controls referrer info | strict-origin-when-cross-origin |
| Content-Security-Policy | Restricts resource loading | Define trusted sources per directive |
| Strict-Transport-Security | Forces HTTPS | max-age=31536000; includeSubDomains |
For Netlify, add these headers in a netlify.toml file under the [[headers]] section, or in a _headers file in your publish directory.
4. Login Page Protection
Brute-force attacks systematically try thousands of password combinations against your login page. Defend against them with:
- Rate limiting — block IPs after repeated failed attempts
- CAPTCHA — add reCAPTCHA v3 or Cloudflare Turnstile after multiple failures
- Account lockout — lock after 10 failures, notify the user, require email unlock
- Two-factor authentication — see the 2FA guide
- Change the default login URL — on WordPress, change
/wp-adminto a custom path
5. File and Directory Permissions
Incorrect file permissions let attackers read sensitive configuration files or execute malicious scripts. Follow the principle of least privilege:
- Directories:
755(owner can write; group and others can read and execute) - Files:
644(owner can read/write; others read only) - Config files (wp-config.php, .env):
600or640 - Never set files or directories to
777(world-writable)
Additionally, block access to sensitive files via your web server configuration or .htaccess: deny public access to .env, composer.json, and backup archives.
6. Regular Security Audits
Security is not a one-time task. Schedule regular reviews to catch issues before attackers do:
| Frequency | Task |
|---|---|
| Weekly | Apply CMS, plugin, and theme updates |
| Monthly | Review user accounts; remove inactive or unused ones |
| Quarterly | Run a vulnerability scan (Sucuri SiteCheck, WP Scan); review server logs |
| Annually | Full penetration test; review and update your Privacy Policy and incident response plan |
7. Troubleshooting
For further assistance, contact our support team.
