Back to Blog

How to Secure Your Business Website Against Hackers

How to Secure Your Business Website Against Hackers

Your business website is one of your most public-facing assets — and one of the most attacked. Every website on the internet is subjected to automated scanning and probing by bots, script kiddies, and professional criminal gangs looking for vulnerabilities to exploit. The consequences of a successful attack range from embarrassing defacements and SEO spam injection to devastating data breaches, ransomware infections, and regulatory fines from the ICO.

For UK businesses, website security is not optional. Under UK GDPR, if your website collects personal data — contact forms, customer accounts, payment details — you have a legal obligation to implement appropriate technical and organisational measures to protect that data. The NCSC (National Cyber Security Centre) has published extensive guidance on website security, and Cyber Essentials certification requires that externally facing services, including websites, are properly secured.

This guide covers the essential steps every UK business should take to secure its website against hackers, from basic hygiene measures that stop automated attacks to more advanced protections against targeted threats.

39%
of UK businesses identified a cyber attack in the past 12 months
30,000
Websites hacked every day globally according to security researchers
£8,460
Average cost of a cyber attack on a UK small business
86%
of website breaches involve exploiting known, unpatched vulnerabilities

The Most Common Website Attacks

Understanding the threats helps you prioritise your defences. The vast majority of website attacks exploit a small number of well-known vulnerability classes.

SQL Injection

SQL injection attacks exploit websites that construct database queries using unsanitised user input. An attacker enters specially crafted input — often through a search box, login form, or URL parameter — that causes the database to execute unintended commands. This can allow the attacker to read the entire database, modify or delete data, bypass authentication, or even execute operating system commands on the server.

Cross-Site Scripting (XSS)

XSS attacks inject malicious JavaScript into web pages that are then served to other users. When a victim's browser executes the injected script, the attacker can steal session cookies (allowing them to hijack user accounts), redirect users to phishing pages, modify the page content, or exfiltrate sensitive data from the user's session.

Brute Force Attacks

Brute force attacks attempt to gain access to admin panels, CMS login pages, and user accounts by systematically trying large numbers of password combinations. Automated tools can attempt thousands of passwords per minute, and many websites still use weak or default credentials that make this attack trivially successful.

Plugin and Theme Vulnerabilities

For websites built on CMS platforms like WordPress — which powers approximately 43 per cent of all websites — the most common attack vector is through vulnerable plugins and themes. Many WordPress sites run dozens of plugins, each of which represents a potential entry point for attackers if not kept up to date.

Plugin Vulnerabilities
56% of attacks
Brute Force / Credential Attacks
16% of attacks
SQL Injection
12% of attacks
Cross-Site Scripting (XSS)
8% of attacks
File Inclusion / Upload
5% of attacks

Essential Website Security Measures

1. Keep Everything Updated

This single action prevents more attacks than any other. Ensure your CMS (WordPress, Joomla, Drupal, or whatever platform you use) is always running the latest version. Update all plugins, themes, and extensions as soon as security patches are released. Keep the server operating system and web server software (Apache, Nginx, IIS) patched and up to date. Remove any plugins, themes, or components that you are not actively using — unused code is still attackable code.

Automate updates wherever possible. WordPress supports automatic background updates for minor releases and security patches. For plugins, consider enabling automatic updates for all plugins or, at minimum, for those with known security histories.

2. Use HTTPS Everywhere

Every page on your website — not just checkout and login pages — should be served over HTTPS. An SSL/TLS certificate encrypts the connection between the user's browser and your server, preventing attackers from intercepting data in transit. Since 2018, Google Chrome has marked all HTTP sites as "Not Secure," and search engines penalise non-HTTPS sites in rankings.

SSL certificates are available free of charge from Let's Encrypt, and most hosting providers include them at no additional cost. There is genuinely no excuse for any business website to still be running on HTTP in 2026.

3. Implement Strong Authentication

Secure your website's admin panel and any user-facing login areas with strong authentication measures. Use strong, unique passwords for all admin accounts — at least 14 characters with a mix of upper and lower case, numbers, and special characters. Enable multi-factor authentication on the admin panel. Limit login attempts to prevent brute force attacks — lock accounts or introduce increasing delays after three to five failed attempts. Change the default admin URL if your CMS allows it (for example, changing /wp-admin to a custom URL on WordPress). Never use "admin" as a username.

NCSC Password Guidance for Websites

The NCSC recommends using three random words as a password creation strategy for user-facing accounts. For admin and system accounts, they recommend long, randomly generated passwords stored in a password manager. The NCSC also strongly advises against password complexity rules that frustrate users (such as requiring special characters) and instead recommends minimum length requirements of at least 12 characters. For any website handling sensitive data, MFA should be mandatory for all accounts, not just administrators.

4. Deploy a Web Application Firewall (WAF)

A Web Application Firewall sits between your website and the internet, inspecting incoming traffic and blocking malicious requests before they reach your server. A good WAF blocks SQL injection attempts, XSS attacks, malicious file uploads, known vulnerability exploits, and automated bot attacks.

Cloud-based WAF services like Cloudflare, Sucuri, and AWS WAF are the most practical option for SMEs. They require no server-side installation — you simply route your traffic through the WAF by changing your DNS settings. Cloudflare's free plan provides basic WAF protection, while their Pro plan (around £16 per month) adds more comprehensive rulesets.

5. Secure Your Hosting Environment

Your hosting environment is the foundation of your website's security. Use a reputable hosting provider that offers server-level firewalls and intrusion detection, regular server patching and maintenance, DDoS protection, automated backup services, and PHP version management (ensure you are running a supported PHP version if using WordPress or similar CMS).

If you manage your own server, ensure that unnecessary services are disabled, file permissions are correctly set (directories at 755, files at 644 for most CMS platforms), directory listing is disabled, and error messages do not expose sensitive information like file paths or database structures.

Website Security Best Practices

  • All software patched and up to date
  • HTTPS on every page with a valid certificate
  • Web Application Firewall protecting all traffic
  • MFA on all admin accounts
  • Regular automated backups with tested restoration
  • Security headers configured (CSP, HSTS, X-Frame-Options)
  • Regular vulnerability scanning and penetration testing

Common Security Failures

  • CMS and plugins months or years out of date
  • No WAF — direct exposure to all attacks
  • Admin panel accessible with just a password
  • Default admin usernames and weak passwords
  • No backups or untested backup restoration
  • No security headers — vulnerable to clickjacking and XSS
  • Unused plugins and themes still installed

6. Configure Security Headers

HTTP security headers instruct the visitor's browser to behave in ways that protect against common attacks. They cost nothing to implement and significantly improve your website's security posture.

Header Purpose Example Value
Content-Security-Policy (CSP) Controls which resources the browser can load — prevents XSS default-src 'self'; script-src 'self'
Strict-Transport-Security (HSTS) Forces HTTPS connections — prevents downgrade attacks max-age=31536000; includeSubDomains
X-Frame-Options Prevents your site being embedded in iframes — prevents clickjacking SAMEORIGIN
X-Content-Type-Options Prevents MIME type sniffing nosniff
Referrer-Policy Controls referrer information sent with requests strict-origin-when-cross-origin
Permissions-Policy Controls browser features (camera, microphone, location) camera=(), microphone=(), geolocation=()

7. Regular Backups with Tested Restoration

Even with the best security measures, breaches can occur. Regular backups ensure you can recover your website quickly. Back up your entire website — files, database, and configuration — at least daily. Store backups off-site, separate from your web server. Retain multiple backup generations (see our guide on backup retention policies). Test your restoration process regularly — a backup you cannot restore from is worthless.

8. Monitor and Scan

Implement ongoing security monitoring to detect attacks and compromises early. Use uptime monitoring to detect if your site goes down unexpectedly. Run regular vulnerability scans using tools like WPScan (for WordPress), Qualys SSL Labs (for SSL configuration), or commercial scanning services. Monitor file integrity — changes to core files that you did not make may indicate a compromise. Review server logs for suspicious patterns — repeated login failures, unusual traffic spikes, or access to admin URLs from unfamiliar locations.

HTTPS & SSL CertificateEssential
CMS & Plugin UpdatesEssential
Web Application FirewallStrongly Recommended
Security HeadersRecommended
Penetration TestingFor High-Risk Sites

Website Security for E-Commerce

If your website processes payments, additional requirements apply. PCI DSS (Payment Card Industry Data Security Standard) compliance is mandatory for any business that handles card payments. For most UK SMEs, the simplest approach is to use a hosted payment provider like Stripe, PayPal, or Braintree, which handles the card data on their platform and reduces your PCI compliance scope significantly.

Never store credit card numbers on your own server unless you have achieved full PCI DSS compliance — the consequences of a payment data breach include mandatory forensic investigation costs (typically £15,000 to £50,000), fines from the card schemes, liability for fraudulent transactions, and reputational damage that can destroy a small business.

Need a Website Security Assessment?

Cloudswitched provides website security audits, vulnerability assessments, and ongoing website management for UK businesses. We identify and fix vulnerabilities before attackers exploit them, keeping your website and your customers' data safe.

GET IN TOUCH
Tags:Web DevelopmentWebsite Security
CloudSwitched
CloudSwitched

Centrally located in London, Shoreditch, we offer a range of IT services and solutions to small/medium sized companies.