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

Guide to Web Hosting Security Best Practices Graphic

When we think about website security, the highly publicized breaches of major companies come to mind. Multimillion-dollar security leaks involving exposed credit card information, login credentials, and other valuable data are covered extensively by the media, 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. Here, I’ll 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.

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.

10 Providers with the Best Hosting Security Standards in Place

Our staff members at HostingAdvice.com have reviewed various levels of hosting plans to find the best providers out there. Here are our recommendations sorted by the type of hosting plan.

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 $96.75

  • 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.
MANAGED
RATING
4.9
★★★★★
Liquid Web: Our Expert's Review
Setup time: 8 minutes
Alexandra Leslie (HostingAdvice.com): Liquid Web's strong suit is their managed dedicated server hosting. They own and operate three state-of-the-art datacenters in the US and have over 50 developers working tirelessly to build and maintain custom solutions for added performance and... Go to full review »
Money Back Guarantee Disk Space Domain Name Managed Hosting Plans
N/A 211 GB - 1,775 GB SSD New or Transfer www.liquidweb.com/managed

See more secure managed 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.
InMotionHosting.com

InMotion review

Monthly Starting Price $19.99

  • 50% off the first month with added discounts the first year
  • Real-time redundancy powered by a cloud infrastructure
  • FREE cPanel/WHM licenses with enterprise-grade CentOS
  • FREE server management for patches and updates
  • FREE SSDs and SSL certificate for faster, secure hosting
  • Get started on InMotion now.
VPS
RATING
4.9
★★★★★
InMotion: Our Expert's Review
Setup time: 4 minutes
PJ Fancher (HostingAdvice.com): Boasting market-leading VPS hardware, slick management software, and free SSD drives and backups, InMotion offers the most attractive VPS plans you'll find anywhere.Each VPS plan comes with free SSD storage arranged in RAID 6, which is incredibly fast and... Go to full review »
Money Back Guarantee Disk Space Domain Name VPS Hosting Plans
90 days 75 GB - 260 GB SSD New or Transfer www.inmotionhosting.com/vps

3.
LiquidWeb.com

Liquid Web review

Monthly Starting Price $29.50

  • Only pay for resources you use with daily billing
  • 5TB of outgoing bandwidth and FREE incoming bandwidth
  • API access and cPanel available
  • Instant provisioning and SSD speed
  • FREE Storm® Firewall and real-time server monitoring
  • Get started on Liquid Web now.
VPS
RATING
4.9
★★★★★
Liquid Web: Our Expert's Review
Setup time: 7 minutes
Alexandra Leslie (HostingAdvice.com): It's no secret by now that Liquid Web is known for best-in-class technology and reliability that exceeds expectations (from uptime to technical support). Their VPSs embody that reputation to its fullest — including a new Managed WordPress product (Hop one... Go to full review »
Money Back Guarantee Disk Space Domain Name VPS Hosting Plans
N/A 50 GB - 1.6 TB SSD FREE (1 year) www.liquidweb.com/vps

4.
Bluehost.com

Bluehost review

Monthly Starting Price $19.99

  • 2-4 cores and 4-16GB of RAM
  • Endorsed by the WordPress team
  • Redundant storage and optional SiteLock security
  • Seamless migration from Bluehost shared plans
  • Get 50% off your first month (was $29.99, now $14.99)
  • Get started on Bluehost now.
VPS
RATING
4.8
★★★★★
Bluehost: Our Expert's Review
Setup time: 5 minutes
Ryan Frankel (HostingAdvice.com): When comparing the performance versus price of VPS plans, Bluehost brings supreme value to the table. In addition to competitive pricing, they offer premium support and excellent uptime compared to other VPS options in the industry. If you’ve outgrown shared... Go to full review »
Money Back Guarantee Disk Space Domain Name VPS Hosting Plans
30 days 30 GB - 240 GB SSD FREE (1 year) www.bluehost.com/vps

See more secure dedicated server 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.
InMotionHosting.com

InMotion review

Monthly Starting Price $19.99

  • 50% off the first month with added discounts the first year
  • Real-time redundancy powered by a cloud infrastructure
  • FREE cPanel/WHM licenses with enterprise-grade CentOS
  • FREE server management for patches and updates
  • FREE SSDs and SSL certificate for faster, secure hosting
  • Get started on InMotion now.
VPS
RATING
4.9
★★★★★
InMotion: Our Expert's Review
Setup time: 4 minutes
PJ Fancher (HostingAdvice.com): Boasting market-leading VPS hardware, slick management software, and free SSD drives and backups, InMotion offers the most attractive VPS plans you'll find anywhere.Each VPS plan comes with free SSD storage arranged in RAID 6, which is incredibly fast and... Go to full review »
Money Back Guarantee Disk Space Domain Name VPS Hosting Plans
90 days 75 GB - 260 GB SSD New or Transfer www.inmotionhosting.com/vps

6.
LiquidWeb.com

Liquid Web review

Monthly Starting Price $29.50

  • Only pay for resources you use with daily billing
  • 5TB of outgoing bandwidth and FREE incoming bandwidth
  • API access and cPanel available
  • Instant provisioning and SSD speed
  • FREE Storm® Firewall and real-time server monitoring
  • Get started on Liquid Web now.
VPS
RATING
4.9
★★★★★
Liquid Web: Our Expert's Review
Setup time: 7 minutes
Alexandra Leslie (HostingAdvice.com): It's no secret by now that Liquid Web is known for best-in-class technology and reliability that exceeds expectations (from uptime to technical support). Their VPSs embody that reputation to its fullest — including a new Managed WordPress product (Hop one... Go to full review »
Money Back Guarantee Disk Space Domain Name VPS Hosting Plans
N/A 50 GB - 1.6 TB SSD FREE (1 year) www.liquidweb.com/vps

7.
Bluehost.com

Bluehost review

Monthly Starting Price $19.99

  • 2-4 cores and 4-16GB of RAM
  • Endorsed by the WordPress team
  • Redundant storage and optional SiteLock security
  • Seamless migration from Bluehost shared plans
  • Get 50% off your first month (was $29.99, now $14.99)
  • Get started on Bluehost now.
VPS
RATING
4.8
★★★★★
Bluehost: Our Expert's Review
Setup time: 5 minutes
Ryan Frankel (HostingAdvice.com): When comparing the performance versus price of VPS plans, Bluehost brings supreme value to the table. In addition to competitive pricing, they offer premium support and excellent uptime compared to other VPS options in the industry. If you’ve outgrown shared... Go to full review »
Money Back Guarantee Disk Space Domain Name VPS Hosting Plans
30 days 30 GB - 240 GB SSD FREE (1 year) www.bluehost.com/vps

See more secure virtual server plans »

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

  • Known for high-performance, low-cost shared hosting
  • FREE website builder with 1,000s of templates
  • Endorsed by the WordPress.org team as a top WP host
  • FREE CDN accelerates your site’s page loading
  • Usually $7.99/month, but our visitors pay $2.95/month
  • Get started on Bluehost now.
SHARED
RATING
5.0
★★★★★
Bluehost: Our Expert's Review
Setup time: 4 minutes
Ryan Frankel (HostingAdvice.com): If you’re looking for an affordable host, Bluehost is a solid, reputable choice, but their low cost coupled with their supremacy in the shared hosting arena is what makes this provider such a value deal. The Bluehost name is listed toward the top of many of... Go to full review »
Money Back Guarantee Disk Space Domain Name Shared Hosting Plans
30 days Unlimited FREE (1 year) www.bluehost.com/shared

9.
iPage.com

iPage review

Monthly Starting Price $1.99

  • An industry-leading shared host with competitive pricing
  • Attract visitors with a complimentary marketing suite
  • $500 in extras like Google AdWords and SiteLock security
  • Start selling online in minutes
  • Get more than 75% off today! (usually $8.99/month)
  • Get started on iPage now.
SHARED
RATING
4.8
★★★★★
iPage: Our Expert's Review
Setup time: 5 minutes
PJ Fancher (HostingAdvice.com): Whether you're a first-time website owner or a web veteran, iPage’s excellent hosting services and fantastic list of extras make them one of the best values in web hosting.Unlimited disk space, bandwidth, and emails are just a part of what makes iPage’s... Go to full review »
Money Back Guarantee Disk Space Domain Name Shared Hosting Plans
30 days Unlimited FREE (1 year) www.ipage.com/shared

10.
InMotionHosting.com

InMotion review

Monthly Starting Price $2.95

  • A favorite for shared hosting (and dedicated or cloud)
  • FREE SSD storage packs 20x the performance
  • FREE SSL certificate and 24/7 support
  • 1-click installs for WordPress and popular CMSes
  • Get started with FREE website transfer service
  • Get started on InMotion Hosting now.
SHARED
RATING
4.8
★★★★★
InMotion: Our Expert's Review
Setup time: 5 minutes
PJ Fancher (HostingAdvice.com): InMotion offers an excellent business-class shared hosting plan. While carrying a higher price tag than other cheap hosts, it has a very nice list of features to help justify the extra cost. For the IT crowd in the audience, you’ll appreciate SSH access, as... Go to full review »
Money Back Guarantee Disk Space Domain Name Shared Hosting Plans
90 days Unlimited FREE (1 year) www.inmotion.com/shared

See more secure shared hosting plans »

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!

Alexandra Leslie

Questions or Comments? Ask Alexandra!

Ask a question and Alexandra will respond to you. We strive to provide the best advice on the net and we are here to help you in any way we can.