14 Web Hosting Security Best Practices, Plus Top Hosts & Servers (Feb. 2024)

Web Hosting Security Best Practices

When we think about web hosting security best practices, it’s often in the context of when things go wrong. Multimillion-dollar security leaks involving exposed credit card information, login credentials, and other valuable data are covered extensively by the media, perhaps leaving one to believe only large-scale businesses are susceptible to online security risks

Don’t be fooled. Security standards are vital to the well-being of any website, large or small. That’s why site owners are often bombarded by warnings of security risks in tandem with the sales pitches of many hosting providers. How do you separate the sales hype from the real risks?

Education is the first step to protecting your online brand. Let’s cover some best practices to follow in your website management operations, as well as some key features to look for in the most secure web hosting companies.

Most Secure Hosts | Security Features | Best Practices

10 Providers with the Best Web Hosting Security Standards

Before we dive into all the technical details and nuanced legwork that goes into properly protecting a website, let’s show you a whole bunch of hosting providers that take care of all of it for you. You can still learn about all the facets of web security later on in the article, but these companies let you learn and practice with less at stake. We’ve reviewed various levels of hosting plans to find the best providers out there. Here are our recommendations sorted by the type of hosting plan.

Shared | VPS | Dedicated | Managed

Secure Shared Hosting

In a shared hosting scenario, your site is a folder on a server shared by many other sites. Server-level operations and security needs are handled by the host company. It is an economical starting point for sites that don’t need a lot of resources.

Though shared hosting is perceived as the least secure of the three main hosting buckets — shared, virtual, and dedicated servers — the best shared hosts on the market will ensure your site is perfectly safe from standard threats. Our #1 pick for shared hosting is below.

1. Hostinger.com

Hostinger Review

Monthly Starting Price $2.49

  • Unlimited everything, from storage to databases
  • FREE site builder & WP performance upgrades
  • FREE daily or weekly backups
  • Custom control panel and auto-installation scripts
  • SSH access & unlimited FREE SSL certificates
  • Get started on Hostinger now.

5.0 ★★★★★ Our Review

Hostinger: Our Expert's Review

Laura Bernheim (HostingAdvice.com): As the shared hosting market becomes increasingly saturated, unlimited storage, bandwidth, and email accounts have become surprisingly average. Hostinger, however, extends the routine, expected metrics to greater lengths — the number of websites, databases, FTP users, subdomains, and parked domains are all unrestricted for most customers. Go to full review »

Money Back Guarantee Disk Space Domain Name Setup Time
30 days 50 GB SSD - 200 GB SSD FREE (1 year) 3 minutes

2. IONOS.com

1&1 IONOS Review

Monthly Starting Price $1.00

  • $1/month for 12 months
  • No hidden fees, pay just $12 at checkout
  • Easy setup and 24/7 expert support
  • FREE domain or transfer, plus FREE SSL certificate
  • Unlimited storage and databases with most plans
  • Get started on 1&1 IONOS now.

4.9 ★★★★★ Our Review

1&1 IONOS: Our Expert's Review

Alexandra Anderson (HostingAdvice.com): If budget is the main factor on your mind when searching for your next web host, search no more. 1&1 IONOS has an impressive range of robust web hosting and website building packages for what may be the best price we've ever seen in the world of hosting. Go to full review »

Money Back Guarantee Disk Space Domain Name Setup Time
30 days 10 GB - Unlimited FREE (1 year) 4 minutes

3. A2Hosting.com

A2 Hosting Review

Monthly Starting Price $2.99

  • FREE Cloudflare CDN and SSD speed boost
  • Optimized caching and 1-click installs
  • Unlimited email, domains, and databases
  • Advanced security and FREE HackScan
  • 24/7 support via phone, chat & tickets
  • Get started on A2 Hosting now.

4.9 ★★★★★ Our Review

A2 Hosting: Our Expert's Review

Alexandra Anderson (HostingAdvice.com): There are plenty of excellent cPanel shared hosting providers out there, so what sets A2 Hosting apart from the rest. Not only does the company offer a ton of features, but it has custom-built its packages for enhanced performance, speed, and security — putting your priorities above pricing. Go to full review »

Money Back Guarantee Disk Space Domain Name Setup Time
30 days 100 GB SSD - Unlimited SSD New or Transfer 4 minutes

See more secure shared hosting plans »

Secure VPS Hosting

A virtual private server (VPS) is a virtual machine, a program running on a host computer that acts as its own entity or server. You share the host machine with other customers, but each virtual server is an independent unit under the full control of the customer.

You still get a lot of server-level control and responsibilities with the VPS route, and you’re less susceptible to the noisy neighbor issue experienced by shared hosting customers. Check out the experts’ top pick for secure virtual server hosting below:

4. Hostinger.com

Hostinger Review

Monthly Starting Price $5.99

  • Cloud-based SSD storage for speed and reliability
  • Double your RAM with burst periods
  • FREE dedicated IPv4 and IPv6 addresses
  • Custom control panel for reboots and OS installs
  • HostingAdvice readers enjoy more than 50% off
  • Get started on Hostinger now.

4.9 ★★★★★ Our Review

Hostinger: Our Expert's Review

Laura Bernheim (HostingAdvice.com): Hostinger's laser focus on providing affordable hosting solutions shines brightest with the company's VPS packages. The company provides six different virtual server plans, including one that costs less than $5. Go to full review »

Setup Time Disk Space CPU RAM
6 minutes 50 GB NVMe - 400 GB NVMe 1 - 8 cores 4 GB - 32 GB

5. Kamatera.com

Kamatera Review

Monthly Starting Price $4.00

  • Cloud VPS that's more flexible and affordable
  • Load balancer, firewall, and managed services
  • Premium Intel CPUs with 300% more power
  • Choose between monthly or hourly billing
  • Sign up today for a 30-day FREE trial
  • Get started on Kamatera now.

4.8 ★★★★★ Our Review

Kamatera: Our Expert's Review

Laura Bernheim (HostingAdvice.com): Backed by cutting-edge cloud computing technology, Kamatera adds instant and limitless scalability to the VPS hosting marketplace. Each cloud or virtual server is equipped with blazing-fast SSD storage and Intel Xeon Platinum CPUs. Go to full review »

Setup Time Disk Space CPU RAM
5 minutes 20 GB SSD - 4 TB SSD 1 - 32 cores 1 GB - 128 GB

6. A2Hosting.com

A2 Hosting Review

Monthly Starting Price $2.99

  • Turbo server & cache options for faster page loads
  • Well-built plans starting with 4GB RAM
  • FREE CDN plus auto-installs with Softaculous
  • Multilingual support and up to unlimited databases
  • Enhanced security with and daily kernel updates
  • Get started on A2 Hosting now.

4.8 ★★★★★ Our Review

A2 Hosting: Our Expert's Review

Alexandra Anderson (HostingAdvice.com): While A2 Hosting's turbocharged shared hosting platform gives site owners ample room to grow, the company's tech prowess is on full display with its portfolio of VPS options. Ranging from unmanaged, bare-metal environments to stress-free, fully managed space, A2 Hosting is sure to have the perfect option for your expanding online presence. Go to full review »

Setup Time Disk Space CPU RAM
7 minutes 20 GB SSD - 450 GB SSD 1 - 10 cores 1 GB - 32 GB

See more secure virtual server plans »

Secure Dedicated Hosting

With a dedicated server, you are the lone customer. You have total control over — and responsibility for maintaining — your server’s hardware, software, and all-around security, although the hosting company may help with server-level operating system updates and security patches. Our leading recommendation for dedicated servers also happens to lead by example when it comes to security standards.

7. InMotionHosting.com

InMotion Review

Monthly Starting Price $69.99

  • Bare-metal or managed servers available
  • 1-on-1 time with a server administrator
  • 99.99% uptime via Smart Routing™ technology
  • Tier 1 network with redundant bandwidth
  • SSH root access and DDoS protection on all servers
  • Upgrade for cPanel, migration, and auto backups
  • Get started on InMotion now.

4.9 ★★★★★ Our Review

InMotion: Our Expert's Review

PJ Fancher (HostingAdvice.com): InMotion Hosting offers amazingly fast and reliable dedicated hosting on market-leading hardware — making it an easy choice for anyone seeking a premium dedicated server host. From free SSDs to a fanatical support team, InMotion has all the bases covered for both small-scale and large-scale operations. Go to full review »

Setup Time Disk Space CPU RAM
7 minutes 1 TB SSD - 3.2 TB SSD 12 - 32 cores 192 GB DDR4 - 512 GB DDR4

8. IONOS.com

1&1 IONOS Review

Monthly Starting Price $32.00

  • Explore server deals to find the best rates
  • High powered modern AMD and Intel processors
  • Unlimited traffic and 1 Gbit/s network connectivity
  • 8-minute deployment with full API control
  • Auto backups, DDoS protection, and RAID-1 storage
  • Get started on 1&1 IONOS now.

4.9 ★★★★★ Our Review

1&1 IONOS: Our Expert's Review

Alexandra Anderson (HostingAdvice.com): If you need blazing-fast speed, optimum uptime, top-notch flexibility, and full control over the fate of your website the dedicated servers from 1&1 IONOS have you covered. The company offers an assortment of entry-level, performance-focused, and business-class server options. Go to full review »

Setup Time Disk Space CPU RAM
7 minutes 480 GB SSD - 2 TB HDD 2 - 32 cores 12 GB - 256 GB

9. LiquidWeb.com

Liquid Web Review

Monthly Starting Price $75.00

  • Linux or Windows with choice of 3 control panels
  • 100% network and power uptime guarantees
  • Custom configurations and instant provisioning
  • Auto-migrations, backups, and real-time monitoring
  • Block/object storage and load balancer add-ons
  • Get started on Liquid Web now.

4.8 ★★★★★ Our Review

Liquid Web: Our Expert's Review

Alexandra Anderson (HostingAdvice.com): Liquid Web's strong suit is managed dedicated server hosting. The company owns and operates five state-of-the-art datacenters in the US and Europe works tirelessly to build and maintain custom solutions for added performance and security. Go to full review »

Setup Time Disk Space CPU RAM
8 minutes 480 GB SSD - 960 GB SSD (+ 2 TB SATA) 4 - 16 cores 16 GB - 64 GB

See more secure dedicated server plans »

Most Secure Overall: #1 Managed Hosting Provider

Managed hosting means your host handles the hardware while you manage your website content and software. This type of premium hosting service minimizes the amount of hands-on IT work your team is responsible for, and the burden of security maintenance — at least from a server infrastructure and operating system point of view — is predominantly placed on your hosting company’s shoulders. And while there are several levels of management available depending on the provider and plan you choose, we find managed web hosting to be your best bet for hassle-free, secure web hosting. See our expert-rated pick for managed hosting services below:

10. LiquidWeb.com

Liquid Web review

Monthly Starting Price $16.00

  • Choice of self-, semi-, or fully managed
  • Enterprise-grade Intel hardware
  • Linux or Windows operating system
  • RAID SSD storage for added speed
  • 100% network uptime
  • Get started on Liquid Web now.

4.9 ★★★★★ Our Review

Liquid Web: Our Expert's Review

Alexandra Anderson (HostingAdvice.com): It's no secret by now that Liquid Web is known for best-in-class technology and reliability that exceeds expectations. The company's cloud VPS environments embody that reputation to its fullest — including managed WordPress and WooCommerce products. Go to full review »

Setup Time Disk Space CPU RAM
7 minutes 40 GB SSD - 200 GB SSD 2 - 12 cores 2 GB - 12 GB

See more secure managed server plans »

Web Host Security Features to Look for

Most of us will use a hosting provider and select one of their plans. The services fall on a spectrum ranging from shared hosting to dedicated server hosting. The hosting provider will take care of many security measures, but, depending on the plan you select, you should ask questions to learn exactly which features the company provides and what you need to do.

1. Backups and Restore Points

People often overlook backups as an element of security. Backups both provide and require security. Backups must be kept in a secure location away from the main server, following the other security steps we will outline. A secure backup provides a trusted repository for the latest copies of the system and data that can be deployed to restore a known, clean system to operation.

Website backups with digital cloud illustration
Redundant website backups is a mission-critical security feature we look for when conducting host reviews.

It is important to ask about a hosting company’s backup schedule and restore policies. For example, how frequently are backups conducted — weekly, monthly, or daily? Will the support reps help you restore your site from backup files, or are the backups intended for their use only? Will the team find and restore lost or corrupted files or will they only do a complete replacement from a recent backup? Will the hosting service only use the most recent backup or can you request restores from further back in time, and if that’s the case, how far back in time can you go?

2. Network Monitoring

Does the host provider monitor the internal network for intrusions and unusual activity? Diligent monitoring can stop server-to-server spread of malware before it gets to the server hosting your site. Ask for some details on how the support team monitors the network, whether the staff is dedicated to this function, and what the engineers look for. SolarWinds’s guide to network monitoring best practices details several procedures and policies that any good network management team should follow.

3. SSL, Firewalls, and DDoS Prevention

Distributed-Denial-of-Service (DDoS) attacks happen when an overwhelming amount of traffic is sent to your site, rendering it useless to visitors. Prevention starts at the edge of the network with a good firewall. However, there are limits to how well a firewall stops DDoS attacks.

Can your provider give you some sense of what intrusions the company’s firewalls are likely to stop and what other measures the security team employs? If you have a plan in which you manage your own server, you will need to know how to augment what the hosting service provides. At what stage will the network monitoring folks inform plan owners of potential problems that might affect their site?

Does the provider make SSL certificates available? It will be your responsibility to implement SSL, but you can’t if it is not available. We’ll get back to this in section 12.

4. Antivirus and Malware Scanning and/or Removal

You should understand which protective actions your hosting provider will perform and what you must do on your own to protect your website. Does the support team run scans on the files in your account, and can you see the reports? If your account becomes infected, does the support plan include help in identifying and removing the malware? The server security steps we describe starting with step 6 will take you a long way toward keeping malware off your website.

5. High Availability and Disaster Recovery

Look for a hosting company that will keep your site running with 99.9% uptime or better. This goes beyond file-level backups. Is a bare-metal image available for your server? This is a complete copy of a clean, functioning server operating system for a speedy recovery from system failures.

The host’s network should have redundant hardware to guard against downtime caused by hardware failures. Firewalls can be configured to run in pairs, with each one ready to take over the full load in case the other one fails. The same concept extends to servers. Hardware failover is an important component of high-availability networks.

magnifying glass on padlock
Your host should not only protect your site with threat mitigation but be there to help you recover when disaster strikes.

Load balancing is another high-availability feature. In this case, multiple servers are ready to handle server traffic. They all work with the same copy of your website data stored on a network shared drive and hand off traffic to each other so that no one server becomes overburdened.

Server Security Best Practices

If you have a plan that provides a server without management support, you may have to do some or all of this on your own. If your plan does include some degree of hardware and/or software management support, the following will give you an idea of which questions to ask or what the support people are talking about.

6. Access and User Permissions

At the host level, access means physical access to the machines, as well as the ability to log into the server. Physical access should be limited to trained technicians with security clearance.

You and your host company should use Secure Socket Shell (SSH), or equivalent, to log into the server to maintain the operating system (OS) or the website. For extra security, use RSA keys protected by a passphrase. Digital Ocean and Rackspace both have tutorials on how to do this.

Another good security step is to whitelist IPs that are allowed to access the server for maintenance. This can be done and modified through the hosting company’s control panel provided for your account. You should also disable logins from the user root. Malicious players will commonly attempt to exploit this access point because the root user has full administrative privileges. You can always give equivalent permission to authorized admin logins.

Files are protected by file permissions. Incorrect permissions cause time-consuming errors, and it is tempting to fix these errors by granting full permissions to all files. Don’t do this. It gives any criminal hacker full control of your system if they get in. Sucuri’s guide to website security includes a primer on correct file permissions.

7. File Management

All access to your server is remote. No one will go to the server to add, remove, or move website content files. You should use secure FTP (SFTP) with a secure and robust password for all file transfer and maintenance while also following other FTP and SFTP best practices.

8. Applications and Logins

The hosting company should have a strict password policy for employees with mandatory password changes at regular intervals as well as when equipment or personnel changes. You should have similar policies for your server access passwords. Establish and enforce policies for strong passwords. Those who want to can exploit weak passwords within hours.

Remove any unused, unmaintained apps on the server so no one can exploit unpatched vulnerabilities. Install — and maintain — utilities that monitor the server CPU, disk use, memory use, and application uptime.

The databases on your server are potentially vulnerable targets for online criminals. UC Berkeley provides a guide to hardening databases against attacks.

Coding and Website Security Best Practices

The security of your website software and data files is your responsibility, even with a managed hosting plan. As a webmaster, you are responsible for managing your content and your site’s functionality. The hosting company does not know what you want on the site or how you want it to function for your site visitors.

9. Passwords and User Access

At the website level, you will have passwords for people who administer the site, guest authors, and potentially website visitors, depending on the nature of the site. Establish and enforce password strength policies for everyone who has backend access.

password and padlock icons
Enforce password strength policies and require site admins and contributors to update their credentials regularly.

Admin staff and guest authors will need a stronger password because their accounts have potentially greater impact on your site. Enforce changes after any suspected hacking attempt or when updating the content management system (CMS) or other software. The info@yourdomain.com address/username is commonly attacked and should not be used. Use secure password managers to generate unique complex passwords.

Each account holder should have the fewest privileges needed to do their job. For example, never give admin privileges to a guest author. Your CMS should have a level of privileges that allows them to upload and edit their post and nothing more. Each person should have his or her own login so they are held responsible for all changes made by that account. High-level admins can monitor the activity of all accounts.

Never allow unrestricted file uploads. Limit uploads to the types of files your users will really need to upload, and exclude scripts or other executable code. An uploaded executable file coupled with poor file access settings will give an intruder instant control of your website.

Your server config files include settings that restrict access to your files, such as browsing directories, and protect folders containing sensitive information. See the OS-specific section for more details.

10. Plugins, Software Updates, and Backups

Always keep your CMS and software updated. Latest versions are patched to fix all known security holes. Change any default settings, such as the admin login name, that individuals can find and use to break in.

When installing plugins and other software, consider the code’s age or the date of its last update, as well as the number of installs. These metrics give you an idea of the safety and reliability of the product. If it is inactive, it probably has not been vetted for security holes. Be wary of the source of the download for this software. Third-party sites may have added malware to the package.

Your website content is not secure until you have automatic, frequent, and redundant backups conducted. The backups should be stored apart from your main server. The idea is to protect your content against said server’s potential failure. A backup that is on the server will often fail along with the server, depending on the nature of the disaster. The backups should happen frequently enough to capture changing and new content, and they should happen without needing someone to remember to start them each time. Test the backups to be sure that the system is working. Check these critical website best practices for more ways to develop a sound backup strategy.

If you have custom themes, plugins, or similar software, it is a good idea to keep fresh copies of the install files. If they have malfunctioned or been compromised, that problem will be saved on the backup. The install files ensure you can get back to a pristine working copy.

Keep in mind that a backup gets your site back in a hurry, but it does not fix the underlying problem that crashed it. For example, if someone used an exploit to penetrate your site, that vulnerability still exists in the backup copy and needs to be fixed right away.

11. Code Reviews

A code review is an in-depth check of an application after development is complete and it is ready to be released. This is best done with a mix of automated tools and human inspection. The review is conducted in the full context of using the app — from login and authentication to data processing, encryption, and storage.

Magnifying glass and desktop screen with code
Code reviews and QA should be a non-negotiable part of your development workflow.

Be wary of SQL (Structured Query Language) deviously inserted into your website files by a third party. SQL injection is a method in which an attacker responds to an input request, such as username, with a valid SQL command. These commands can access data or delete it. Microsoft’s guide to SQL injection describes the attacks in detail and suggests ways to mitigate the risk such as with the use of session variables.

12. Encryption, Firewalls, and DDoS Protection

A web application firewall (WAF) monitors HTTP traffic to and from specific web applications. This provides more specific security than a network firewall, which does monitor HTTP, but does not understand the specific requirements of a web application. A WAF can be configured to prevent SQL injections as well as other techniques such as cross-site scripting and probing for vulnerabilities.

Although DDoS prevention should be enacted at the network level, attackers may use one or a combination of several methods to flood your servers, and site owners must respond and protect themselves accordingly. Several noteworthy security leaders, including Cloudflare and Incapsula, offer advanced mitigation and prevention tools and services that can be employed to help keep sites safe.

Finally, SSL (secure sockets layer) technology is required when sensitive data is transferred to and from the server. An SSL certificate does not secure your server from attacks or malware, but rather encrypts and secures communication between your server and the person using your site. By using SSL, you are securing your customer’s information and keeping their trust in your site.

Operating System Security Best Practices

Some of the measures that you take will depend on the operating system of your server. Web servers run either on Linux/Unix or on Windows. You usually choose this when you choose the hosting plan.

13. Linux and Unix-Based OS

The server config file on Linux servers is called .htaccess. You can set rules in this file that prevent directory browsing and other activities that could expose sensitive information or open the server to other vulnerabilities.

Although the PHP (hypertext preprocessor) language is more available and convenient, there are risks to using it on these servers. These OSes have a permission called executable, which means the file can execute code. It is important to limit executable commands when using PHP. This is where a code review is beneficial.

In general, Linux/Unix OSes have fewer known threats and a faster response. SELinux and AppARMOR are two security extensions that are used with these servers.

14. Windows OS

Windows servers have user privileges, such as executable, limited by default, and admins must enter passwords to gain high-level permissions. Security measures are guided by the Security Compliance Manager function on these servers. The config file where access restrictions are set is web.config. Microsoft provides a guide to security best practices. Although there are more known security holes with the Windows OS, trained Microsoft programmers patch flaws and release updates and are available to respond to incidents.

Mitigate Threats to Your Website & Server By Following These Standards

Although security seems frightening, webmasters who pay attention and have the help of a good hosting service partner can run websites without experiencing any major disruptions. By following basic, common-sense rules like enforcing strong passwords, keeping up with updates, trusting established hosting and service providers, and scheduling regular backups, your site should be just fine.

A little knowledge goes a long way, so don’t let the learning process stop once your site is launched. The online security threat matrix is ever-evolving, and it behooves you to stay abreast of the latest trends, standards, and emergent threats. May the secure web hosting force be with you!

Advertiser Disclosure

HostingAdvice.com is a free online resource that offers valuable content and comparison services to users. To keep this resource 100% free, we receive compensation from many of the offers listed on the site. Along with key review factors, this compensation may impact how and where products appear across the site (including, for example, the order in which they appear). HostingAdvice.com does not include the entire universe of available offers. Editorial opinions expressed on the site are strictly our own and are not provided, endorsed, or approved by advertisers.

Our Editorial Review Policy

Our site is committed to publishing independent, accurate content guided by strict editorial guidelines. Before articles and reviews are published on our site, they undergo a thorough review process performed by a team of independent editors and subject-matter experts to ensure the content’s accuracy, timeliness, and impartiality. Our editorial team is separate and independent of our site’s advertisers, and the opinions they express on our site are their own. To read more about our team members and their editorial backgrounds, please visit our site’s About page.