WhichWebHosting home

HomeGuidesHosting typesWhat is shared hosting?

What is shared hosting?

Published

Share

On shared hosting, many accounts share one server's resources and you're limited to the software your host provides or supports, InMotion Hosting says.1, source 1 On a server running CloudLinux OS, each account's CPU, memory and processes can be limited, so that no single site can bring the server down.2, source 2

What does it mean that hosting is shared?

A web server can be hardware, software, or both working together.3, source 3 On the hardware side, a web server is a computer that stores web server software and a website's component files.3, source 3 An HTTP server is software that understands URLs and HTTP, the protocol your browser uses to view webpages.3, source 3 An HTTP server can be accessed through the domain names of the websites it stores, and it delivers their content to the end user's device.3, source 3

A web server stores a website's HTML documents and their related assets, including images, CSS stylesheets, JavaScript files, fonts and video.3, source 3 After you have a web hosting service, you must upload your files to your web server.3, source 3 In the Apache HTTP Server, running more than one website on a single machine is called virtual hosting.4, source 4

For virtual hosts, the fact that sites run on the same physical server is not apparent to the end user.4, source 4 InMotion Hosting may share the hardware and software resources behind its web hosting between InMotion Hosting customers on the same servers.5, source 5 Using that web hosting for online file storage, archiving or data unrelated to a website is prohibited under InMotion Hosting's terms.5, source 5 CloudLinux says a single site can consume all CPU, IO, memory or Apache processes and bring a server to a halt.2, source 2

How do many sites share one server?

Apache versions 1.1 and later support both IP-based and name-based virtual hosts.4, source 4 Virtual hosts can be IP-based, with a different IP address for every website.4, source 4 IP-based virtual hosts use the IP address of the connection to determine which virtual host to serve.6, source 6 IP-based virtual hosting needs a separate IP address for each host.6, source 6

Virtual hosts can be name-based, with multiple names running on each IP address.4, source 4 With name-based virtual hosting, the Apache server relies on the client to report the hostname as part of the HTTP headers.6, source 6 That way, many different sites can share the same IP address.6, source 6 Name-based virtual hosting eases the demand for scarce IP addresses.6, source 6

Apache recommends name-based virtual hosting unless you use equipment that explicitly demands IP-based hosting.6, source 6 Name-based virtual hosting is usually simpler, Apache says, because you only configure DNS to map each hostname to the correct IP address and then configure Apache to recognize the hostnames.6, source 6 In Apache, you must first configure DNS to map the names in ServerName or ServerAlias to an IP address associated with your server.6, source 6 Each name-based virtual host needs at minimum a ServerName directive to say which host is served and a DocumentRoot directive to say where that host's content lives in the filesystem.6, source 6

When a request arrives, Apache first finds the best matching virtual host for the IP address and port the request used.6, source 6 If more than one virtual host has the best-match address and port, Apache compares the ServerName and ServerAlias directives with the server name in the request.6, source 6 If no ServerName or ServerAlias matches, the first listed virtual host for that address and port is used.6, source 6

In cPanel, the Domains interface is used to create and manage multiple domains from a single cPanel account.7, source 7 In a WHM package, a Dedicated IP is a static IP address that the account will not share with other accounts, unless you specify an account to share an IP address with.8, source 8

How can a server keep accounts apart?

One way is CloudLinux's LVE, a kernel-level technology developed by the CloudLinux team.2, source 2 LVE has common roots with container-based virtualization and uses cgroups.2, source 2 The goal of LVE is to make sure that no single website can bring down the web server.2, source 2 LVE works through collaboration of an Apache module, a PAM module and the kernel.2, source 2

The mod_hostinglimits Apache module detects the VirtualHost that a request came from.2, source 2 It then puts the Apache process serving a request into the LVE of the account set by the SuexecUserGroup directive for that virtual host.2, source 2 The kernel makes sure all LVEs get a fair share of the server's resources and that no account can use more than the limits set for it.2, source 2 CloudLinux can limit CPU, virtual and physical memory, IO, the number of processes and the number of entry processes.2, source 2

Each LVE limits entry processes to prevent a single site exhausting all Apache processes.2, source 2 CloudLinux recommends LVE Manager in a control panel for controlling LVE limits, and the command-line tool lvectl is an alternative.2, source 2 In WHM, a package can be assigned to any account on the server.8, source 8

In cPanel, the Disk Usage interface only appears if the hosting provider's server profile enables it.9, source 9 In cPanel's CPU and Concurrent Connection Usage interface, you can view and monitor resource usage on your cPanel account.10, source 10 The CPU and Concurrent Connection Usage feature only exists on servers that run CloudLinux.10, source 10

What limits does a shared account have?

In WHM, a package's Disk Space Quota is the maximum space on the server's hard drive that the account can use.8, source 8 A Monthly Bandwidth Limit is the amount of information the account can transfer each month.8, source 8 A package can cap the number of email accounts for the cPanel account.8, source 8 A package can also cap the number of addon domains for the account.8, source 8

In cPanel, the Disk Usage interface shows information about your files, your directories, and how you use your account's disk space.9, source 9 CloudLinux describes its SPEED limit as a CPU limit relative to a single core, or specified in HZ.2, source 2 A SPEED limit of 100% means one core.2, source 2 The PMEM limit is the physical memory limit, which also includes shared memory and disk cache.2, source 2

CloudLinux says the physical memory limit is a much better way to limit memory for shared hosting.2, source 2 The EP limit on entry processes usually represents the maximum concurrent connections to Apache dynamic scripts, plus SSH and cron jobs running simultaneously.2, source 2 An inode is a data structure on a file system that keeps information about a file or a folder.2, source 2 The number of inodes indicates the number of files and folders an account has.2, source 2

CloudLinux's inode limits are supported on the cPanel, Plesk and DirectAdmin control panels.2, source 2 For a typical hosting account, CloudLinux recommends SPEED=100%, PMEM=1GB, VMEM=0, IO=1024KB/s, IOPS=1024, NPROC=100 and EP=20.2, source 2

All Hostinger hosting plans, including those with unlimited services, are subject to limits on inode count, database size, CPU power, RAM, entry processes and active processes.11, source 11 Hostinger's unlimited web hosting features are subject to its Fair Usage Policy.12, source 12 HostGator says shared accounts with more than 200,000 files, or inodes, can have an adverse effect on server performance.13, source 13 Under HostGator's terms, shared hosting space may not be used as offsite storage for media, emails or files.13, source 13

What happens when a site reaches a limit?

On a CloudLinux server, a site limited by CPU or IO starts responding slower.2, source 2 IO limits affect only disk IO and have no effect on the network.2, source 2 When an IO limit is reached, processes are throttled and put to sleep.2, source 2 A site limited by memory or the number of processes gets 500 or 503 errors saying the server cannot execute the script.2, source 2

When a CloudLinux LVE goes over its physical memory limit, CloudLinux OS first frees memory used for disk cache and, if that is not enough, kills some processes in that LVE.2, source 2 In CloudLinux, once the NPROC limit is reached, an additional process cannot be created until another one dies.2, source 2 When the entry process limit is reached, mod_hostinglimits cannot place the Apache process into the LVE and returns error code 508.2, source 2 A very heavy site then slows down and returns 508 errors without affecting other sites.2, source 2

In CloudLinux, a hard inode limit prevents an account from writing data to disk.2, source 2 A soft inode limit can be exceeded for a period of time.2, source 2 The default grace period for a soft inode limit is seven days.2, source 2 In cPanel, most files occupy slightly more disk space than their actual size.9, source 9

In cPanel, a "Write failed: disk quota exceeded" warning means the account has used the maximum disk space its quota allows.9, source 9 You cannot save any files once no disk space remains under the quota.9, source 9 The backup process for an account near or over its quota may fail because the system cannot write necessary files, such as a database lock file.9, source 9 An account's disk usage calculation includes MySQL and PostgreSQL database size, but the quota is not enforced when a database pushes the account over its limit.9, source 9

In cPanel, to increase your disk quota, you must contact your hosting provider.9, source 9 HostGator may automatically upgrade an account to a higher plan at an additional fee when it exceeds its plan limits.13, source 13 A Hostinger site that exceeds its plan limits may slow down or stop being served until resources are released or added, and it may be suspended temporarily or permanently.11, source 11

What does a shared plan include?

HostGator shared hosting includes cPanel access.14, source 14 InMotion Hosting's shared hosting includes cPanel.15, source 15 Hostinger's web hosting gives you access to tools such as SSH, WP-CLI, PHP version control, Git integration and a MySQL manager in its hPanel control panel.12, source 12 Under HostGator's terms, you are responsible for keeping scripts and programs installed under your account secure.13, source 13

The HostGator Hatchling plan allows 10 websites and 10 GB of SSD storage, the Baby plan allows 20 websites and 20 GB of SSD storage, the Business plan allows 50 websites and 50 GB of SSD storage, and the Pro plan allows 100 websites and 100 GB of SSD storage.14, source 14 When you compare cheap web hosting plans, check how many websites and how much storage each one allows. InMotion Hosting's shared Power plan allows 10 websites and 200GB of NVMe storage.15, source 15 Hostinger's Premium plan allows 3 websites, and its Unlimited plan allows unlimited websites.12, source 12

InMotion Hosting's shared hosting includes free cPanel email accounts on your own domain.15, source 15 HostGator's Hatchling, Baby and Business plans include POP3 email accounts with SMTP.14, source 14 A free SSL certificate from Let's Encrypt comes with each of HostGator's Hatchling, Baby, Business and Pro plans.14, source 14 Hostinger says its Premium and Unlimited plans have a free SSL certificate installed automatically.12, source 12

HostGator runs courtesy website backups automatically in the background on its Hatchling, Baby and Business plans.14, source 14 Its shared plans also include a free tool for migrating WordPress sites to HostGator.14, source 14 Free shared hosting migration by InMotion's team is limited to one cPanel or WordPress backup.15, source 15 Hostinger says it offers free unlimited website migration with no downtime.12, source 12

InMotion Hosting says the vCPU and RAM on its VPS hosting are guaranteed rather than shared or burstable.1, source 1

Common questions

Can one shared hosting plan run more than one website?

Yes, and the number of sites differs by plan. HostGator allows 10 websites on Hatchling and 100 on Pro. Hostinger's Premium plan allows 3 websites.

Do shared hosting sites share an IP address?

Yes, they can, with name-based virtual hosting in Apache. Many different sites can then share the same IP address. In a WHM package, a dedicated IP is a static address the account will not share with other accounts unless you specify an account to share it with.

What is an inode on shared hosting?

An inode is a data structure on a file system. It keeps information about a file or a folder. The count is the number of files and folders an account has.

What happens if my site uses too many resources on shared hosting?

It may slow down, show errors or be suspended. On CloudLinux servers, a site limited by CPU or IO starts responding slower, and one limited by memory gets 500 or 503 errors. Under Hostinger's terms, a site that exceeds its plan limits may be suspended temporarily or permanently.

Does shared hosting come with cPanel?

Sometimes, depending on the host's plans. HostGator and InMotion Hosting include cPanel access. Hostinger's web hosting tools are in its hPanel control panel.

Can I use shared hosting for file storage?

No, not under HostGator's or InMotion Hosting's terms. InMotion Hosting prohibits using its web hosting for online file storage, archiving or data unrelated to a website. HostGator says shared hosting space may not be used as offsite storage for media, emails or files.

Sources

Every fact on this page comes from one of these, checked before it goes live.

More guides

Hosting types

What is web hosting?

Web hosting is the service of keeping a website's files on a connected web server. Learn how servers, domain names and hosting plans work together.

· Mateo Cardenas

Hosting types

How to choose a VPS provider

To choose a VPS provider, fit the plan to your workload, pick shared or dedicated CPU, decide who runs the server, and check location, backups and support.

· Mateo Cardenas

Hosting types

Web hosting vs WordPress hosting

WordPress hosting is web hosting that runs WordPress. Most web hosts can run it; with managed WordPress hosting, the provider manages the software.

· Mateo Cardenas