
Summary: For most businesses, website security comes down to doing the basics well: HTTPS everywhere, updated software, off-server tested backups, access with strong passwords and two-factor authentication, protected forms and hosting that keeps the server up to date. Most attacks exploit known, already-fixed flaws.
Nobody thinks about security until the day the site shows a strange page, Google displays a red warning or company emails start landing in spam. The good news is that most of these problems are preventable. The references used here are the OWASP Top 10, the list of the most critical web application risks, plus MDN and Google documentation.
1. HTTPS across the whole site
A TLS certificate (popularly called SSL) encrypts the connection and avoids the "Not secure" warning. Free certificates exist today, such as Let's Encrypt. Make sure of:
- A 301 redirect from every
httprequest tohttps. - No resource loaded over
http(mixed content). - Automatic renewal: since March 15, 2026, the maximum validity of public certificates dropped to 200 days, and it will keep falling to 47 days in 2029, per the CA/Browser Forum.
Details in site shows "Not secure".
2. Automatic, off-server, tested backups
Backup is your site's insurance. Follow the 3-2-1 rule: three copies, on two types of media, one off the server. Keep several versions (an intrusion can go unnoticed for days) and test restores periodically.
3. Updates
CMS, plugins, themes, JavaScript libraries and the PHP version must be on supported releases. OWASP lists "vulnerable and outdated components" among the top risks. Remove what you don't use: a deactivated plugin can still be exploited if its files are on the server.
4. Passwords, access and 2FA
- A long, unique password for the site admin, hosting, domain and email. A password manager solves this.
- Two-factor authentication wherever available, especially for domain registration and hosting.
- One account per person, with the lowest permission level needed. No shared "admin" user.
- When someone leaves the company or the supplier changes, their access goes too.
5. Forms and customer data
- Server-side validation (not just in the browser) and parameterized database queries to prevent SQL injection.
- Protection against spam and bots (reCAPTCHA, honeypot, rate limits).
- Collect only the data you need and disclose its use in the privacy policy, as data protection laws such as Brazil's LGPD require.
6. Security headers
A few HTTP headers reduce risk with little effort. Example for Apache (.htaccess); test first, because an overly strict policy can break legitimate scripts:
<IfModule mod_headers.c>
Header always set Strict-Transport-Security "max-age=31536000; includeSubDomains"
Header always set X-Content-Type-Options "nosniff"
Header always set Referrer-Policy "strict-origin-when-cross-origin"
Header always set X-Frame-Options "SAMEORIGIN"
Header always set Permissions-Policy "camera=(), microphone=(), geolocation=()"
</IfModule>
HSTS makes browsers use only HTTPS on your domain; enable it only after confirming the whole site (and subdomains, if you use includeSubDomains) works over HTTPS. See the definitions on MDN. Plan a full Content-Security-Policy carefully: it's powerful, but requires mapping every script in use.
7. Hosting that takes care of the server
Web application firewall, account isolation, updated operating system and PHP, brute-force protection and backups. Ask your provider how each item is handled. See how to choose hosting and our information security measures.
How to check your site now
- Search Console → Security issues: tells you if Google detected malware, hacking or social engineering.
- Site status in Google Safe Browsing.
- MDN's HTTP Observatory for security headers.
- The admin user list: anyone you don't recognize?
What if the site has already been hacked?
- Don't delete files on your own: they help identify how the attacker got in.
- Change every password (admin, hosting, FTP/SFTP, database, email) from a clean computer.
- Contact whoever manages the site and hosting.
- Restore a backup from before the intrusion and apply all updates before going live.
- Find and fix the cause (vulnerable plugin, leaked password).
- If Google flagged the site, request a review in Search Console's Security issues report.
If you need help, our website maintenance plan covers updates, backups and monitoring, or contact us.
Sources and references
- OWASP Top 10
- OWASP: HTTP Security Headers Cheat Sheet
- MDN: Strict-Transport-Security
- Search Console: Security issues report
- CA/Browser Forum: Ballot SC-081v3
- WordPress: hardening
Frequently asked questions
Are small sites targeted by hackers?
Yes. Most attacks are automated and scan thousands of sites for known flaws, without choosing victims by size.
Does an SSL certificate make the site secure?
It protects the connection between visitor and server. It doesn't prevent intrusions via outdated software or weak passwords. It's one layer, not the only one.
How often should I change passwords?
Current guidance is to use long, unique passwords with 2FA and change them when a leak is suspected or someone with access leaves, rather than forced periodic changes.
How do I know if my site was hacked?
Common signs: strange redirects, pages or users you didn't create, a Google warning, company emails landing in spam. Check the Security issues report in Search Console.
Want peace of mind about your website?
We handle updates, backups and security monitoring so you can focus on your business.
Read also
- "Not secure" website: what it means and how to fix it
- How much does website maintenance cost and what does it include?
- Website down: what to do and how to find the cause
Written by Mário Moreno, founder of Agência hetsi, which has been building websites and handling digital marketing for businesses in Brazil and abroad since 2000. Mário Moreno on LinkedIn