Web development 9 min read
Website security for small businesses: 10 practical measures
HTTPS and HSTS, updates, passwords and two-factor authentication, access rights, 3-2-1 backups, firewall, form protection, hosting, monitoring and what the GDPR requires after a breach: ten measures to secure a small business website.
On this page
- Why small business websites get attacked
- Website security works in layers
- 10 practical website security measures
- 1. HTTPS everywhere, with HSTS
- 2. Update everything, quickly
- 3. Strong, unique passwords and two-factor authentication
- 4. Least privilege: the right access for each person
- 5. Backups that follow the 3-2-1 rule
- 6. A web application firewall and a CDN
- 7. Protect your forms
- 8. Choose hosting that takes security seriously
- 9. Monitoring and alerts
- 10. Know what to do in case of a data breach
- Personal data breach: what the GDPR requires
- A quick website security checklist
- How we can help
- Frequently asked questions
“Who would want to hack my little website?” Probably nobody, personally. But website security for small businesses is not about being a target: most attacks are automated. Bots test millions of sites for known flaws, weak passwords and forgotten admin pages, and take whatever opens. A hacked showcase site can send spam, host phishing pages, redirect your visitors or leak the messages sent through your forms. The good news: ten measures, most of them simple, stop the vast majority of these attacks. Here they are, in order of priority, followed by what the GDPR requires if personal data is ever exposed.
Why small business websites get attacked
An attacker gains something from almost any website: its server to send spam or attack others, its reputation with Google to publish hidden spam pages, its visitors to redirect them to scams, and the personal data it stores (contact requests, client accounts, orders). Small sites are attractive precisely because they are often less maintained. Google’s Security issues report lists the usual results: injected code, spam links and pages created without the owner’s knowledge.
Website security works in layers
No single tool makes a site secure. Each layer stops part of the attacks, and the next one limits the damage when one fails. Backups and monitoring sit outside the layers: they are what lets you recover and react.
10 practical website security measures
1. HTTPS everywhere, with HSTS
Every page must load over HTTPS, and every HTTP address must redirect permanently (301) to its HTTPS version. Then add the HSTS header: it tells browsers to use only HTTPS for your domain for a given time, so a visitor cannot be silently downgraded to an insecure connection on a public Wi-Fi. Start with a short duration, check that every subdomain works over HTTPS, then extend it (see the MDN documentation).
Strict-Transport-Security: max-age=31536000; includeSubDomains
Only add includeSubDomains when every subdomain (webmail, old test sites) supports HTTPS, and do not request inclusion in the browsers’ preload list unless you are sure: it is hard to undo.
2. Update everything, quickly
The CMS, its plugins and themes, the libraries of a custom site and the server’s PHP version. Most intrusions on small sites exploit a flaw that was already fixed in a newer version. Apply critical security updates within days and the rest on a regular rhythm, after testing on a copy; our guide to website maintenance describes a safe process.
3. Strong, unique passwords and two-factor authentication
Reused passwords are the easiest way in: when another service leaks, attackers try the same e-mail and password everywhere. Use a password manager and a different password for each account. For a password used alone, the CNIL gives as examples at least 12 characters mixing upper case, lower case, digits and special characters, or at least 14 characters without special characters (see its authentication guidance, in French). Above all, turn on two-factor authentication (2FA) wherever it exists: the site’s admin, the hosting account, the domain registrar, the e-mail, the payment provider. These are the keys to everything else.
4. Least privilege: the right access for each person
One account per person, never a shared “admin” account: you know who did what, and you can remove one person without changing everyone’s password.
The lowest role that does the job: someone who writes blog posts does not need to install plugins.
Remove accesses the day someone leaves, including former agencies and freelancers. Review the list of accounts every quarter.
Limit login attempts and avoid an obvious “admin” username.
5. Backups that follow the 3-2-1 rule
Keep 3 copies of your data (the live site and two backups), on 2 different kinds of storage, with 1 copy away from the server, at another provider. If possible, make one copy impossible to delete from the server itself, so that an attacker who takes control of the site cannot destroy the backups too. And test a restore regularly: a backup that has never been restored is a hope, not a plan.
6. A web application firewall and a CDN
A CDN with a web application firewall (WAF) sits in front of your site and filters traffic before it reaches the server: known attack patterns, aggressive bots, floods of requests on the login page. It also absorbs traffic spikes and speeds up static files. It is a useful layer, not a substitute for updates: a flaw in your own code remains a flaw.
7. Protect your forms
Forms are the main entry point for spam and abuse. Validate every field on the server, not only in the browser; limit the number of submissions per visitor; add an invisible “honeypot” field and, if needed, a privacy-friendly challenge such as Cloudflare Turnstile. If visitors can upload files, restrict the types and sizes, check the real content of each file, and never make uploads directly executable on the server. Collect only the data you need: what you do not store cannot leak.
8. Choose hosting that takes security seriously
Ask your host which PHP versions it offers (and until when), whether sites are isolated from each other, whether server backups exist and where, whether file transfer uses SFTP rather than plain FTP, and where the data is located: for personal data, a host in the European Union simplifies GDPR compliance. Cheap shared hosting is not insecure by nature, but an outdated server configuration is beyond your control. For how hosting, DNS and domain fit together, see domain name, DNS and hosting explained.
9. Monitoring and alerts
An intrusion discovered after three days costs far less than one discovered after three months. Set up uptime monitoring, alerts on logins to the admin from new devices, alerts on modified files, and vulnerability alerts for the components you use. Verify your site in Google Search Console: it e-mails you when it detects hacked content or malware. Make sure every alert reaches someone who reads it.
10. Know what to do in case of a data breach
Write down, before anything happens, who to call (your web provider, your host), where the backups are, and what the GDPR requires. The next section summarises it.
Personal data breach: what the GDPR requires
Under the GDPR, a personal data breach is a security incident that leads to the accidental or unlawful destruction, loss, alteration, unauthorised disclosure of or access to personal data: a hacked contact form database, a stolen laptop with client files, an e-mail sent to the wrong list. Three obligations follow:
Notify the CNIL without undue delay and, where feasible, within 72 hours of becoming aware of the breach, unless it is unlikely to result in a risk for the people concerned (article 33). If you do not have all the information yet, you can notify in stages; the CNIL provides an online notification service.
Inform the people concerned without undue delay when the risk to their rights is high, for example when passwords or bank details are exposed (article 34).
Document every breach internally, including those you do not notify: what happened, its effects and the measures taken (article 33, paragraph 5).
Your providers have a duty too: a host or web agency that processes data on your behalf must inform you without undue delay when it becomes aware of a breach. Check that your contracts say so.
For immediate help, the French public service 17Cyber, run by the police, the gendarmerie and Cybermalveillance.gouv.fr, offers an online diagnosis and directs businesses to the right assistance. Do not wipe the server before evidence has been preserved: the logs are needed to understand what happened, to notify accurately and to file a complaint.
A quick website security checklist
Measure | How to check it in a few minutes |
|---|---|
HTTPS and HSTS | Type your address with http:// and check the redirect; look for the Strict-Transport-Security header in the browser’s developer tools |
Updates | The admin’s updates page shows nothing pending; the PHP version is still supported |
Passwords and 2FA | 2FA is on for the site, hosting, registrar and e-mail |
Access rights | The user list contains only current people, each with the lowest role needed |
Backups | The latest backup is recent, stored off the server, and a restore was tested this quarter |
Forms | Spam is filtered and messages actually arrive |
Monitoring | Uptime and Search Console alerts reach a person who reads them |
Breach plan | A written page says who to call and how to notify the CNIL |
How we can help
A website audit checks your security headers, versions, accounts and backups and gives you a prioritised action plan. Our managed hosting includes HTTPS, daily backups, security updates and uptime monitoring, and our maintenance plan keeps the site and its components up to date. If you are choosing a technology, the security section of our comparison of WordPress and custom websites explains where the risks come from on each.
Frequently asked questions
Is a small showcase website really at risk?
Is an HTTPS certificate enough to make my site secure?
Do I have to notify the CNIL if my site is hacked?
What is the 3-2-1 backup rule?
What should I do first if my website is hacked?
How secure is your website?
We check your site, accounts and backups and give you a clear, prioritised list of fixes.