Dutch cloud. Human support.

Website Security: A Practical Guide

Securing a website is not a one-time action. It is an ongoing process of layers: technical measures, configuration, monitoring and maintenance. Many organizations think an SSL certificate is enough. That is the starting point, not the finish line.

In this guide, we cover the measures that actually matter. No academic list, but what you concretely need to handle to protect your website against the most common attacks.

The basics: what every website needs

HTTPS everywhere

HTTPS is no longer optional. Without an SSL/TLS certificate, browsers mark your site as insecure, search engines trust you less, and every piece of data coming through your forms is vulnerable to interception.

A certificate is not expensive. Let's Encrypt provides them for free, and good hosting providers set this up by default. But two things regularly go wrong: certificates expire without anyone noticing (result: error page for all visitors), and mixed content (an HTTPS page loading HTTP resources) that undermines the security.

Ensure automatic renewal and periodically scan for mixed content. And use HTTP Strict Transport Security (HSTS) to force browsers to always use HTTPS, even if a user types http://.

Security headers

HTTP headers are a layer of protection that many websites miss, while they are cheap to implement. The key ones:

  • Content-Security-Policy (CSP) – determines which scripts, stylesheets and other resources your page may load. Blocks cross-site scripting (XSS) attacks effectively when properly configured.
  • X-Frame-Options – prevents your site from being loaded in an iframe on another site (clickjacking protection).
  • X-Content-Type-Options – prevents browsers from applying MIME sniffing to your files.
  • Referrer-Policy – controls what information your browser sends when a user navigates from your site to another site.

Check your current headers via securityheaders.com. A C or D is normal for an unoptimized site, giving you immediate insight into what is still missing.

Access and authentication

Strong password policy and MFA

Brute-force attacks on login pages are daily routine. If you run WordPress with the default /wp-admin, Joomla with /administrator, or another popular CMS, your login page gets attempted multiple times per day.

Minimum measures: limit the number of login attempts (brute-force restriction), use long, unique passwords and enable multi-factor authentication for all admin accounts. That last one alone eliminates most automated attacks.

Minimal access rights

Give accounts only the permissions they need. Editors do not need full administrator access. FTP accounts for specific folders do not need write access to the entire server. This sounds obvious, but in practice we often see setups where everyone has admin rights "for convenience".

Also remove old accounts. Employees who have left, agencies that completed the project, testers who were given access: those accounts need to go. They are an open door for attackers trying stolen credentials.

Security layers of a website

Infrastructure
Reliable hosting, firewalls, DDoS protection, network segmentation
Transport
HTTPS/TLS, HSTS, valid certificates, no mixed content
Application
WAF, CSP headers, input validation, patches, secure code
👤
Access
MFA, minimal permissions, strong password policy, account management
👁️
Monitoring
Uptime monitoring, log analysis, alerts on unusual behavior

Security works in layers. An attack that passes layer 3 is stopped by layer 4. Or layer 5 detects it.

Web Application Firewall (WAF)

A WAF filters incoming traffic at the application level. Where a regular firewall looks at IP addresses and ports, a WAF looks at the content of the traffic. SQL injection, cross-site scripting, directory traversal: a WAF recognizes these attack patterns and blocks them before they reach your application.

For most websites, a cloud-based WAF is the practical choice. Cloudflare, Sucuri and similar services sit between the user and your server. They process the traffic, filter malicious requests and forward only legitimate traffic. Added benefit: they also function as a CDN, which improves your load times.

A WAF is not a replacement for secure code. If your application has an SQL injection vulnerability, you want to fix it, not just filter the attacks around it. But a WAF does give you an extra layer of defense and buys you time when a zero-day vulnerability is discovered in software you use.

Patching and updates

Most successful attacks on websites exploit known vulnerabilities in outdated software. WordPress plugins, Joomla components, PHP versions, server software: the attack surface is large if you fall behind on updates.

Set up automatic updates for your CMS core and plugins where possible. Keep your PHP version current: PHP 8.1 and older no longer receive security updates. Test updates first in a staging environment for critical production sites, but do not delay them for weeks.

For server software: Ubuntu LTS and RHEL/CentOS have security updates for multiple years. Use unattended-upgrades or similar tools for automatic security patches. Make sure you know which software versions are running and when support ends.

Backups that actually work

Backups are the most underrated security measure. They do not help against an active attack, but they are the reason why you are back online within hours after an attack instead of days.

Three principles for backups that actually help:

Offsite storage. If your backup is on the same server as your site, that backup is gone when the server is compromised. Store backups on a different system, preferably at a different location.

Testing. A backup you have never restored is a backup you do not know works. Do a recovery test periodically. Not once a year, but at least every quarter.

Retention period. Ransomware can be dormant for weeks before it strikes. If you only have daily backups from the past week, all those backups are already infected. Keep backups for at least 30 days, longer for critical systems.

Most common attacks and countermeasures

SQL Injection
WAF, parameterized queries, input validation, use ORM
Cross-Site Scripting
Content-Security-Policy header, output encoding, WAF
Brute force login
MFA, login rate limiting, CAPTCHA, IP blocking after attempts
Outdated plugins
Automatic updates, staging environment, vulnerability scanner
Clickjacking
X-Frame-Options header, Content-Security-Policy frame-ancestors
Data leakage
HTTPS+HSTS, encryption at rest, minimal data collection, access control

Source: OWASP Top 10 (2021) · NCSC Factsheet web application security

Monitoring and detection

Security without monitoring is hoping nothing happens. Monitoring gives you the signals to respond before an incident escalates into a crisis.

At minimum, you want:

  • Uptime monitoring with alerts when your site is unreachable
  • Login monitoring with notifications for failed attempts or unusual times
  • File integrity checks that warn you when something in your application files has changed
  • SSL certificate monitoring so you renew on time or are warned of problems

For organizations that fall under NIS2 or work with sensitive data, a Security Information and Event Management (SIEM) system is the next step. It centralizes logs and gives you correlation between events, so you see a pattern that you would miss with separate tools.

Where to start?

If you want a priority list, start here:

  1. HTTPS on all pages, with automatic certificate renewal and HSTS
  2. MFA on all admin accounts
  3. Automatic updates for CMS and plugins
  4. Offsite backups with retention period of at least 30 days
  5. Secure HTTP headers (CSP, X-Frame-Options, HSTS)
  6. WAF if your budget and risk profile justify it
  7. Monitoring for availability, logins and file changes

That is not a list you finish in an afternoon, but these are measures with high risk reduction per hour invested. Organizations that have this in order are significantly harder to compromise than the average website that only has an SSL certificate.

Security is never done. But a solid baseline separates the organizations that survive an incident from the organizations that end up in the news because of one.

Need help securing your website? See our compliance solutions.

Need help with implementation?

Our experts are happy to provide personal advice.

Schedule a call