Skip to main content

Web hosting security is a shared responsibility. Your hosting provider protects the underlying infrastructure and may supply tools such as network firewalls, malware scanning and backups. You still need to secure your hosting account, website software, administrator access, files, databases and the way your team works.

Whether you manage a business website, an online shop or a WordPress installation, a single weak account, unpatched plugin or exposed service can create an entry point for an attacker. The following ten steps provide a practical approach to reducing risk across a hosting environment. Some controls are managed by your hosting provider, while others require action from you or your developer.

Why Web Hosting Security Matters

A compromised hosting account can affect more than the website itself. Attackers may deface pages, inject malicious code, steal customer information, send spam, access databases or use the server to attack other systems. An incident can also interrupt business operations and damage customer confidence.

Security hardening means reducing the number of ways an attacker could gain access and limiting the damage if an account or application is compromised. It is an ongoing process, not a one-time configuration task. Start with the controls available in your hosting plan, then add application and server protections that match your website and the information it handles.

Step 1: Choose a Reputable Hosting Provider

Your hosting provider is part of your security boundary. Before choosing a plan, review the provider’s security documentation and ask who is responsible for operating system updates, network protection, malware response, backups and incident communication.

Look for clear information about:

  • Infrastructure protection: Network firewalls, DDoS mitigation and secure data-centre operations.
  • Account security: Multi-factor authentication, secure account recovery and access controls.
  • Backups: Backup frequency, retention periods, storage location and restoration procedures.
  • Software maintenance: How server operating systems, control panels and core services are patched.
  • Incident support: How to report a suspected compromise and how the provider communicates security incidents.
  • Transparency: Clear acceptable-use policies, security responsibilities and service commitments.

Do not assume that every feature is included in every plan. Confirm which controls are provided, which are optional and which remain your responsibility. A managed hosting service may handle more server maintenance than an unmanaged VPS, but you should still secure your own application and user accounts.

Step 2: Keep Software and Server Components Updated

Outdated software can contain vulnerabilities that attackers already know how to exploit. Keep your content management system, themes, plugins, frameworks, PHP version, control panel and server packages within supported release cycles.

  • Install security updates promptly after checking compatibility and taking a backup where appropriate.
  • Remove plugins, themes, extensions and applications that are no longer used.
  • Download updates only from trusted publishers and official repositories.
  • Replace software that has reached end of life with a supported alternative.
  • Test important updates on a staging site when your website has complex customisations.

Automatic updates can help, particularly for routine security releases, but they should be paired with monitoring and a recovery plan. For WordPress sites, review the official WordPress security and hardening guidance.

Step 3: Use Strong, Unique Passwords and a Password Manager

Use a different password for every important account, including your hosting control panel, WordPress administrator, email, FTP or SFTP, database and domain registrar accounts. Reusing passwords creates a chain reaction: a password exposed on one service may be tried against your other accounts.

Use a reputable password manager to generate and store long, unique passwords. Current NIST guidance recommends a minimum of 15 characters for passwords used as a single authentication factor, permits password managers and does not recommend arbitrary character-composition rules such as requiring a particular mix of symbols and uppercase letters. Where a service supports multi-factor authentication, enable it as well. See the NIST Digital Identity Guidelines.

Never send passwords in plain text through email or chat. If a credential may have been exposed, change it promptly and review recent account activity.

Step 4: Enable Multi-Factor Authentication

Multi-factor authentication (MFA) requires an additional proof of identity beyond a password. It can prevent an attacker who has obtained a password from signing in without the second factor.

Enable MFA wherever it is available, prioritising:

  • Your hosting provider and control panel account.
  • Your domain registrar and DNS management account.
  • WordPress administrator and other privileged CMS accounts.
  • Email accounts used for password resets or account recovery.
  • Cloud services, backup systems and server management tools.

Prefer phishing-resistant methods such as passkeys or security keys where supported. Authenticator applications are generally preferable to relying on SMS codes when stronger methods are available. Store recovery codes securely and make sure more than one authorised administrator can recover access through a documented process.

Step 5: Configure HTTPS and TLS Correctly

HTTPS uses Transport Layer Security (TLS) to protect data travelling between a visitor’s browser and your website. It helps prevent network observers from reading or altering traffic in transit. It does not, by itself, protect a site from malware, compromised accounts, insecure plugins or database attacks.

To configure HTTPS properly:

  1. Install a valid certificate for every domain and subdomain that needs HTTPS.
  2. Configure the web server or hosting control panel to serve the site over HTTPS.
  3. Redirect HTTP requests to the correct HTTPS URL without creating redirect loops.
  4. Update WordPress, application settings, canonical URLs and internal resources to use HTTPS.
  5. Check for mixed content, expired certificates and hostname mismatches.
  6. Renew certificates before they expire, preferably using automated renewal where supported.

Let’s Encrypt provides free, automated TLS certificates. Follow its official getting-started guidance and your hosting provider’s instructions for installation and renewal.

Step 6: Set Up a Web Application Firewall

What a WAF Does

A web application firewall (WAF) inspects HTTP requests and can block traffic that matches known attack patterns or rules. Depending on its configuration, it may help reduce exposure to common web application attacks such as SQL injection, cross-site scripting and malicious automated requests.

A WAF is a useful layer, not a substitute for secure application code, patching, authentication or backups. It may not recognise every attack, and poorly tuned rules can block legitimate visitors or interfere with application features.

Configure and Review WAF Rules

  • Confirm whether your hosting provider supplies a WAF and whether it is enabled for your domain.
  • Use a maintained ruleset and update it as recommended by the provider.
  • Review blocked requests and investigate repeated or unusual patterns.
  • Test rule changes against forms, logins, APIs and checkout flows.
  • Document exceptions and avoid broad allow rules that weaken protection.

For a closer explanation of a common web server security module, read What Is ModSecurity? A Guide for Web Hosting Users.

Step 7: Apply Secure File Permissions and Ownership

File permissions control which users can read, modify or execute files and directories. Incorrect permissions can expose configuration files or allow an attacker who has gained limited access to modify website code.

Do not apply a single permission value to every file and directory without considering the server’s user and group ownership. WordPress documentation describes a possible permissions scheme, but the correct settings depend on how the web server and hosting account are configured.

  • Give files and directories only the access they need to operate.
  • Avoid using 777 permissions as a general troubleshooting fix.
  • Protect configuration files that contain database credentials and secret keys.
  • Restrict write access to application files where practical.
  • Use SFTP rather than unencrypted FTP when transferring files, if your host supports it.
  • Review ownership and permissions after migrations, restores or security incidents.

See the WordPress hardening guide for platform-specific advice. If you are on shared hosting, ask the provider before changing ownership or permissions that could affect other services.

Step 8: Disable Unnecessary Services and Restrict Access

Every enabled service, account or application feature adds to the environment that must be maintained. Remove what you do not need and restrict administrative access to trusted users and networks.

  • Delete unused FTP accounts, database users and CMS administrator accounts.
  • Use SFTP or SSH instead of insecure file transfer methods where supported.
  • Disable directory listing unless there is a clear requirement for it.
  • Restrict SSH and control panel access using available IP allowlists, VPNs or other access controls.
  • Close unused network ports and disable services that are not required.
  • Use separate accounts for individual team members instead of shared administrator logins.
  • Grant each account only the permissions needed for its role, and remove access when a person leaves.

On shared hosting, the provider manages many server-level services and firewall rules. Do not attempt to change system-wide settings unless your plan gives you permission and you understand the impact.

Step 9: Maintain Secure, Tested Backups

Backups help you recover after accidental deletion, hardware failure, a failed update or a security incident. They are not a complete security control if an attacker can also alter or delete the backup copies.

A practical backup plan should include:

  • Complete coverage: Back up website files, databases, configuration and other data needed to restore the service.
  • Suitable frequency: Set backup intervals according to how often the site changes and how much data you can afford to lose.
  • Separate storage: Keep copies away from the live hosting account, preferably with restricted access or immutable protection where available.
  • Retention: Keep multiple recovery points so you can restore from before an incident was discovered.
  • Encryption and access control: Protect backup files and limit who can download or restore them.
  • Restore testing: Periodically restore a copy to a safe test environment and confirm that files, databases and application functions work.

Ask your provider what its backups cover and whether restores are included or charged separately. Keep an independent backup if the data is important to your business.

Step 10: Monitor Website and Server Activity

Security controls are more effective when you can detect suspicious activity and respond quickly. Monitoring should cover both the website application and the hosting environment.

Where available, configure alerts or review reports for:

  • Repeated failed logins, unexpected administrator creation and privilege changes.
  • Unexpected changes to application files, themes, plugins or configuration.
  • Malware detections, suspicious scripts and unusual outbound email activity.
  • Unexpected traffic spikes, repeated requests to sensitive paths and unusual error rates.
  • Server, web application, database and firewall events.
  • Backup failures, storage problems and service interruptions.

Protect log files from unauthorised access and avoid recording passwords, session tokens or other secrets. Define who reviews alerts, how serious events are escalated and how evidence is preserved. The OWASP Logging Cheat Sheet provides further guidance on useful security events, log protection and monitoring.

A Practical Web Hosting Security Maintenance Checklist

Use this checklist to turn the ten steps into a repeatable routine:

  • Review hosting, domain registrar and administrator account access.
  • Check for pending security updates and unsupported software.
  • Confirm MFA is enabled on privileged accounts.
  • Review WAF alerts, login activity and unusual file changes.
  • Confirm backups completed successfully and review retention.
  • Test a restore periodically in a safe environment.
  • Review unused accounts, plugins, themes and services.
  • Check TLS certificate validity and HTTPS configuration.
  • Review security responsibilities with your hosting provider.
  • Document incidents, changes and recovery procedures.

The frequency of each check should reflect the risk and activity of your website. High-traffic shops and sites handling personal information may need more frequent reviews than a simple brochure website.

Common Web Hosting Security Mistakes to Avoid

  • Assuming hosting security is entirely the provider’s job: You still need to protect your applications, credentials and content.
  • Using one password everywhere: A breach on one service can expose other accounts.
  • Leaving unused plugins and accounts active: Unmaintained components and unnecessary access increase exposure.
  • Treating HTTPS as complete website security: TLS protects data in transit, not every part of the website.
  • Keeping backups only on the live server: A compromised account could affect both the website and its backups.
  • Ignoring alerts and logs: Unreviewed alerts cannot help you respond to a developing incident.
  • Changing permissions to 777 to fix errors: This can grant broader access than the application needs.

Frequently Asked Questions

What is web hosting security?

Web hosting security is the collection of infrastructure, account, server and application controls used to protect a hosted website and its data. It includes access control, software updates, firewalls, secure file permissions, backups and monitoring.

Is website security the hosting provider’s responsibility?

It is shared. The provider is responsible for the infrastructure and the services specified in your hosting agreement. You remain responsible for areas such as website software, passwords, user permissions and application configuration, unless your managed service explicitly includes those tasks.

Is an SSL certificate enough to secure a website?

No. HTTPS protects data in transit between a browser and the website. It does not prevent compromised passwords, vulnerable plugins, malware or insecure server configuration. Use it as one part of a broader security programme.

How often should I back up my website?

Choose a frequency based on how often your website changes and how much data you can afford to lose. A frequently updated shop may need more frequent backups than a static site. Keep copies separate from the live account and test restoration.

Do I need a WAF for my website?

A WAF can provide an additional layer of protection, particularly for public-facing applications. Whether you need one and which rules to enable depends on the application, hosting environment and risks. It should complement, not replace, secure code and regular updates.

How can I secure a WordPress website on shared hosting?

Keep WordPress, themes and plugins updated, use unique administrator passwords and MFA, remove unused components, use HTTPS, maintain independent backups and choose secure file permissions. Ask your provider which server-level protections it manages and which controls are available on your plan.

Final Thoughts

Hardening web hosting security is about reducing avoidable weaknesses and preparing to respond when something goes wrong. Start with the fundamentals: choose a provider with clear security practices, maintain supported software, protect every privileged account, configure HTTPS correctly, restrict access, maintain independent backups and monitor important activity.

Review these controls regularly and make sure responsibilities are clear between your team and your hosting provider. A layered, well-maintained approach gives your website a stronger foundation than relying on a single security plugin, firewall or certificate.