When we think about web hosting security best practices, it’s often in the context of when things go wrong, like the highly publicized breaches of major companies. 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 security features to look for in a prospective web hosting company.
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.
- $0.01 for the first month, then $5 monthly after
- NO annual contracts and NO sudden price increases
- Unlimited storage space, data transfers, and email
- New domain is $11 with 1-month plan ($1.99 otherwise)
- 99.9% uptime and price-lock guarantee
- Get started on InterServer now.
- Unlimited everything, from bandwidth to databases
- FREE site builder & WordPress performance upgrades
- FREE daily or weekly backups
- 90+ auto-installation scripts and custom control panel
- SSH access & SSL certificates
- Get started on Hostinger now.
- Known for performance at a low price
- Endorsed by WordPress.org team
- FREE Weebly site builder
- FREE Cloudflare CDN
- Get 63% off today (was $7.99/month)
- Get started on Bluehost now.
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:
- $0.01 for the first month using code HOSTINGADV
- Then $6 monthly with no contracts, no price changes
- Latest versions of PHP, MySQL, Perl, Python, and Ruby
- 7 operating system options for Linux or Windows users
- Full root access and choice of datacenter included
- Get started on InterServer now.
- Managed or unmanaged virtual servers available in Windows or Linux
- Cloud hosting instances with hourly or monthly billing
- Instant upgrades without downtime
- FREE around-the-clock monitoring
- Automatic nightly backups available
- Get started on Hostwinds now.
- High-speed hosting that's faster than AWS, Rackspace, and Digital Ocean
- FREE backups, CDN, root access, and DDoS protection
- Up to 16 processors with all-SSD storage
- Choice between cPanel or Plesk Onyx control panel
- Real-time monitoring and 100% uptime guarantee
- Get started on Liquid Web now.
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.
- 100% network and power uptime guarantees
- Custom configurations, SSDs, and instant provisioning
- Auto-migrations, backups, and real-time monitoring
- Block/object storage and load balancer add-ons
- Our visitors pay $67.58/month! (usually $109/month)
- Get started on Liquid Web now.
- 24/7 uptime monitoring and privately owned datacenter
- Up to 24 cores, 256GB of RAM, and 100TB of bandwidth
- Choose among 12 operating systems and 3 control panels
- Custom configurations built and maintained in-house
- Price-lock guarantee without contracts
- Get started on InterServer now.
- Root access available with 3 levels of server management
- Expertly-tuned servers deployed in 30 minutes or less
- Choose from 4 datacenters spread across 3 continents
- FREE redundant SSD storage in RAID-1 arrays
- Choice of 13 Linux operating systems
- Get started on A2 Hosting now.
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:
- Choice of self-, semi-, or fully managed services
- Enterprise-grade Intel hardware
- Linux or Windows operating system
- RAID SSD storage for added speed
- 100% network uptime
- Get started on Liquid Web now.
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.
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.
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.
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 [email protected] 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.
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, run websites without experiencing any major disruptions. 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!