14 Web Hosting Security Best Practices (2023) — Top Hosts & Servers

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.

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.

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.

8. Bluehost.com

Bluehost Review

Monthly Starting Price $2.95

  • Cheap shared hosting from a trusted provider
  • Ideal for hosting a WordPress website
  • FREE Weebly website builder and Cloudflare CDN
  • Unlimited traffic and 24/7 live chat support
  • Get 63% off today with our Bluehost coupon
  • Get started on Bluehost now.

4.8 ★★★★★ Our Review

Bluehost: Our Expert's Review

Ryan Frankel (HostingAdvice.com): Bluehost pricing is about as competitive as the industry offers. Sign up for a shared hosting plan for as little as $2.95 per month, and WordPress hosting packages are consistently priced; a VPS plan starts at around $18.99 per month; and the dedicated hosting rates are as little as $79.99 per month. Go to full review »

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

9. Hostinger.com

Hostinger Review

Monthly Starting Price $1.99

  • 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.

4.8 ★★★★★ 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 to 200 GB SSD FREE (1 year) 3 minutes

10. HostGator.com

HostGator Review

Monthly Starting Price $2.64

  • Host up to unlimited websites on a single plan
  • FREE SSL certificate included on all plans
  • Unlimited bandwidth & email addresses
  • 1-click WordPress installs & FREE blog tools
  • Get 76% OFF by buying 36 months upfront
  • Get started on HostGator now.

4.7 ★★★★★ Our Review

HostGator: Our Expert's Review

Ryan Frankel (HostingAdvice.com): HostGator is a great compromise between performance and price. The company offers unlimited emails, MySQL databases, disk space, and bandwidth, plus one-click installs of popular open-source projects, in addition to a 99. Go to full review »

Money Back Guarantee Disk Space Domain Name Setup Time
45 days Unlimited FREE (1 year) 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:

5. A2Hosting.com

A2 Hosting Review

Monthly Starting Price $4.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.9 ★★★★★ 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 150 GB SSD - 450 GB SSD 1 - 8 Cores 1 GB - 32 GB

6. InterServer.net

InterServer Review

Monthly Starting Price $6.00

  • $0.01 for the first month using code HOSTINGADV
  • Then $6 monthly with no contracts, no changes
  • Latest of PHP, MySQL, Perl, Python, and Ruby
  • 7 operating system options for Linux or Windows
  • Full root access and choice of datacenter
  • Get started on InterServer now.

4.8 ★★★★★ Our Review

InterServer: Our Expert's Review

Laura Bernheim (HostingAdvice.com): InterServer's on-site datacenter and hands-on involvement with configuring and provisioning virtual private servers give customers a level of flexibility not seen with many other hosting providers. InterServer rations VPS and cloud resources through slices. Go to full review »

Setup Time Disk Space CPU RAM
6 minutes 30 GB SSD - 480 GB SSD 1 - 16 CPUs 2 - 32 RAM

7. InMotionHosting.com

InMotion Review

Monthly Starting Price $17.99

  • HostingAdvice readers get 73% off the first term
  • FREE site migrations and 2 hours of Launch Assist
  • 2 - 3 dedicated IP address options
  • FREE cPanel/WHM licenses included
  • Highly available servers with real-time redundancy
  • Get started on InMotion now.

4.8 ★★★★★ Our Review

InMotion: Our Expert's Review

PJ Fancher (HostingAdvice.com): Boasting market-leading VPS hardware, slick management software, and free SSD drives and backups, InMotion Hosting competes to win when it comes to managed VPS hosting packages. The host initiates its VPS customer relationship with free website migrations and up to two hours of launch assistance from an experienced SysAdmin. Go to full review »

Setup Time Disk Space CPU RAM
6 minutes 45 GB SSD - 300 GB SSD 2 - 8 cores 4 GB - 16 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.

2. LiquidWeb.com

Liquid Web Review

Monthly Starting Price $99.00

  • Plesk, InterWorx, or cPanel (Linux) or Plesk (Windows)
  • 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.9 ★★★★★ 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 250 GB - 500 GB SSD (+ Backup Drives) 4 cores, 3.6 GHz - 12 cores, 2.4 GHz 16 GB - 32 GB

3. InterServer.net

InterServer Review

Monthly Starting Price $44.00

  • 24/7 uptime monitoring and private datacenter
  • Up to 24 cores and 100TB bandwidth
  • 12 operating systems and 3 control panels
  • Custom configs built and maintained in-house
  • Price-lock guarantee without contracts
  • Get started on InterServer now.

4.8 ★★★★★ Our Review

InterServer: Our Expert's Review

Laura Bernheim (HostingAdvice.com): You know a hosting company means business when it owns and operates its own datacenters. Because InterServer employees build and manage servers in the same building as company headquarters, dedicated hosting customers get the utmost in flexibility, support, and around-the-clock monitoring. Go to full review »

Setup Time Disk Space CPU RAM
8 minutes 250 GB - 12 TB SSD 4 - 52 cores, 1 - 2 CPUs 32 GB - 128 GB

4. A2Hosting.com

A2 Hosting Review

Monthly Starting Price $99.59

  • Root access and 3 levels of server management
  • Expertly managed servers deployed instantly
  • Choose from 4 datacenters across 3 continents
  • FREE redundant SSD storage in RAID-1 arrays
  • Choice of 13 Linux operating systems
  • Get started on A2 Hosting now.

4.8 ★★★★★ Our Review

A2 Hosting: Our Expert's Review

Alexandra Anderson (HostingAdvice.com): Whether you're looking for managed or self-managed hosting, A2 Hosting offers three extremely reliable dedicated server plans to meet your needs, depending on your levels of comfort and experience. With A2 Hosting's Unmanaged Flex Dedicated Server plan, users get administrator-level control with root access and their choice of Linux operating system. Go to full review »

Setup Time Disk Space CPU RAM
7 minutes 256 GB SSD - 14 TB HDD Up to 10-core 3.2 GHz CPU 16 GB DDR4 EEC - 128 GB DDR4 EEC

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:

1. LiquidWeb.com

Liquid Web review

Monthly Starting Price $15.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): We've gotten to know a few key members of the Liquid Web team personally, and let us tell you: The passion they put into talking about their products hints that this is a company worth checking out. Liquid Web boasts supreme uptime, always-there-for-you support, and a constant commitment to building out more functionality for the customer. Go to full review »

Money Back Guarantee Disk Space Domain Name Setup Time
N/A 40 GB SSD - 500 GB SSD New or Transfer 7 minutes

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.

Collage Representing Website Backups

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.

Image of Datacenter Cage

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.

Image Depicting Password Security

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.

Screenshot of 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.

Linux Server vs. Windows Server Image

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.