Monday, January 23, 2012

Building Websites IV - Finding a Real Web Host

If you want a real website, you will need to go beyond creating static websites and sign up for a dynamic web host that can run code and access databases. There are many different types of web hosting available, but for a small website the cheapest and simplest option is to get a shared web host account. This means your website will exist on a server with many other websites, but this is much cheaper than trying to rent out an entire server (or even a virtual one) on your own.

There are a huge number of shared web hosts on the internet but it is difficult to find unbiased information about them. Most review sites have affiliate relationships with the web hosts they review and are paid a significant sum every time someone signs up through their referral link. This may bias them somewhat in favor of the web hosts, especially the ones that pay high fees. There are many user reviews also, but it can be difficult to tell which reviews are genuine. However, most of the hosts you will find are decent and reliable for small amounts of traffic, so you just need to find a good price for it. In this post I will review a few options, and won’t include any affiliate links!

Free Web Hosting

Free web hosting will obviously not offer the same quantity, quality or support as paid services, but it probably can be useful to try out some simple PHP code or sites. You can look at different free PHP web hosts here, though many have various conditions for getting the free hosting. Many of these hosts will not offer many basic tools included with paid hosting, such as one-click installers. If you just want to install WordPress (or a couple other popular scripts), you can try out DreamHosts’s free plan called DreamHostApps. However, it may not be fully reliable and will not offer full control. If you want to create a website for a small business or for learning web development, you will need to get a paid web hosting account.

Really Cheap Web Hosting

There are also  various web hosting options that are really cheap. One can try Googling for $1 / month web hosting, but I don’t know how reliable such plans will be. However, there are some legitimate web hosts that offer smaller hosting packages for pretty cheap. A Small Orange is a reliable choice for web hosting which offers 150 MB of storage for $25 / year. It comes with all the standard features of a web hosting package and even some extras, like daily backups.

Another choice is the pay-as-you-go service NearlyFreeSpeech.net which is a good deal for certain small low-traffic sites. While they have certain technical features that cost more in other hosts, they lack many user-friendly features for ordinary people, such as a standard interface or one-click installers. They can be useful for some simple small websites that need greater reliability than a free web host. In general, a beginner should probably avoid using them, and go with a regular shared web host.

Standard Shared Web Hosting 

This is the main category of web hosts for the average user, and there are thousands of web hosts to choose from, with standard prices ranging from $3 – 15 /month. There’s a lot of competition for this market, so the  affiliate links are rampant and the actual terms and prices of many web hosts are often unclear. To find the best prices for a web host one needs to Google the web host name and “discount” or “coupon”. To find out what the web host provides, one can look at their feature list, but these do not tell the full story. Many web hosts promise “unlimited” accounts, but in reality there are obviously certain limits since one cannot get infinite computer resources for $7 / month. To really get the full story of what they provide, one needs to check the official terms of service (TOS) of each web host. Small websites may never reach certain limits, but it is still important to check what the actual limits are. I checked a few well-known low-priced web hosts to get the details of their service and information about them, and I reviewed them below.

Definitions

First, its necessary to explain some basic web hosting terms and their significance.

  • Disk Storage – The amount of hard drive space available for all your sites on the account. If you want to try out many different scripts and sites, you probably do not want a small limit. Hosts with “unlimited” space will provide enough space for regular websites, but they have various terms preventing people from hosting backups or huge files. 
  • Monthly Bandwidth – This primarily refers to the amount of data that is transmitted to users when they visit your webpages. So if you have a 1MB webpage and 1000 people visit it, that will use up 1GB (1000MB) of bandwidth. Again, some hosts promise unlimited monthly bandwidth, but may slow down or suspend the account if there are large traffic spikes or very high overall traffic. Many also forbid using the account primarily for serving high-bandwidth items like videos or downloads.
  • MySQL Databases – The number of databases you can have on your account. These databases are normally used to store all the data generated by a website, such as user accounts or blog posts. Most scripts use one database, though some may use multiple ones. If you plan on trying out a large number of scripts, you will want to avoid a host with a small limit on databases. I don’t think you will run into problems on hosts that promise unlimited databases, unless you really store huge amounts of data. 
  • CPU, RAM and Disk I/O limits – The web hosts never really discuss these limits, but they can be an issue if your website becomes popular and isn’t just serving static files. If your site has many visits that require too much computer processing, most hosts will begin to throttle your CPU usage. If you use too much memory, you will run into RAM limits and if you need to access the hard drive too much, you will run into their Disk I/O limits. Most hosts will simply limit your usage in such cases, though some may suspend your account. All these various limits probably won’t be an issue for a regular small website.
  • Domains Hosted – This is the number of domains, like example.com and mysite.com, that you can use with a web hosts. It means you can buy additional domains from your web host or elsewhere and host them on your account without any additional hosting costs. Its convenient to be able to host a large number of small websites on one account, and this way you can host sites for other people too. So you might as well get a host that doesn’t have a low limit on domains. 
  • Control Panel – This is the most relevant feature to the average user. It is the interface provided by the web host to do all the standard administrative tasks. This is basically the program you will use to do things with your websites. Most webhosts that you will consider use the standard cPanel. You can try a demo of it by clicking on “cPanel Demo” here. Some webhosts use their own custom control panels, which you should compare with cPanel before signing up with them.
  • One-Click Installer – This is another feature very relevant to an ordinary user, which allows one to install and update a large number of popular PHP scripts with very few clicks. There are various one-click installers that come with web hosting, such as SimpleScripts, Softaculous, or custom solutions. They each come with different scripts, and some may not be as easy-to-use or powerful as others. When a web host lists all the scripts they “provide”, they’re just copying the list from their included one-click installer.
  • Language Support – As mentioned in the previous post, basically all web hosts support PHP, but you might want to consider running other code at some point, such as Ruby, which has grown a lot in popularity in the last few years. So it is worth checking what other languages a web host supports.

The Web Hosts

Below I compared a bunch of well-known web hosts that share many features in common. I looked at their features and terms of service to see what deal they provide. They all claim to have  ‘‘unlimited’ storage, bandwidth and allowed domains. This is useful since it means you can try out many different scripts and stuff without being likely to run into any limits. The hosts below can run ruby and python, offer some form of backups, and provide one free domain registration. While some well-known hosts (such as GoDaddy) are also good, their cheapest plans do not have all the above capabilities, so they will not be included in the current comparison.

JustHost

This host has a large internet presence and they offers some good discounts, but they’re somewhat shady. They are part of the massive secret hosting company EIG, along with other hosts like FatCow.com and Dot5Hosting.com. They have very aggressive affiliate marketing, but that isn’t necessarily a bad thing. There are other issues with their honesty though. When you go to the site and use a coupon code, they tell you that you have their highest discount when really it is quite easy to find better ones online. When you try closing a page, they try preventing it with a pop-up pleading you to stay. None of these issues matter too much for the actual web hosting and they seem to be a legitimate host.

JustHost offers the standard features, and they include cPanel and SimpleScripts. JustHost offers nightly backups for files smaller than 40MB. They offer phone, chat and email support, though I don’t know what their quality is.  You can read their actual terms here (in long legalese) and their explanation of “unlimited” hosting here.

Their standard price is $7/month, but you can find deals so that the first years of your account will come out to only $3/month, which is probably one of the best prices you can get.

BlueHost

BlueHost also runs an identical service called HostMonster, and some places online claim they’re also owned by EIG, but I didn’t see any confirmation of this. BlueHost is the web host I used to use and I never had any real problem with their service. They are similar to JustHost in many ways. While they also use a lot of affiliate marketing, they are less shady than JustHost.

BlueHost provides a custom version of cPanel, which works fine, though it includes a bunch of affiliate services which makes things a bit cluttered. They also offer SimpleScripts, with all its free and commercial scripts. BlueHost also offers chat, email and phone support, which I found to be good for the types of questions they will deal with. For example, they’re not going to help you with some issue with WordPress, but they’ll help you connect to your account via FTP.

One slightly annoying practice of BlueHost is that they put their own ad as the default home page for any domain or subdomain that you set up with them. They assume you’ll remove the page soon anyways, but it would be nicer if they just put a simple “coming soon” page as the default.

Account Limits and Backups

Each account provides the standard “unlimited” package and allows for up to 100 mySQL databases. In their TOS, they say that you shouldn’t make gigantic databases since it can affect performance, and then they may ask you to reduce the database size or just terminate your account.

I emailed BlueHost about what their actual limits each account are, and this was their response:

No more than 200,000 total files in one account, unlimited GB storage, up to 100 total mysql databases, 15 mbps bandwidth with no monthly limits.  Each account gets 7% of the total server CPU, and once it goes over that it is throttled.

BlueHost also provides occasional backups (up to 50,000 files and 30GB), but they don’t keep that many copies and they emphasize that you should not rely on them. However, they are real backups and I once contacted them to restore a previous version of my website.

Price

BlueHost’s standard price is also $7/month. You can find online deals where you pay $95 for the first two years, which comes out to $4/month. This is slightly more than JustHost, but they are a more popular and reliable web host.

DreamHost

This is currently the web host I am using. They are different from many other hosts in a number of ways. For one, they try to be honest and up-front about the actual terms of what they offer. This is nice, but not that relevant to the actual hosting service. The most significant difference is that they do not use cPanel, but instead provide their own custom control panel (pictured below). It has a cleaner, more stream-lined look, and provides a lot of control. Many people find this to be dreamhostpanelsuperior to cPanel. However it also has some disadvantages. For example, its one-script installer is not as easy-to-use as SimpleScripts and contains fewer scripts. Also, I found certain actions on it, such as adding domains, took longer to actually happen. In fact, I found that my websites overall were somewhat slower on DreamHost than on BlueHost. I don’t know if this was something unique to my case or a common issue. DreamHost provides good email support but they do not provide free live support. This can be an issue if you need help quickly and do not want to pay extra for it.

Limits and Backups

DreamHost provides shorter, more readable TOS than many web hosts, and they also have an explanation of their ‘unlimited’ policy. It basically explains that you can’t use your hosting account for the “wrong” kind of sites, which is a similar policy as that of most shared web hosts. They do claim to actually provide “unlimited” storage and bandwidth for legitimate usage, which seems to be a better deal than other hosts. DreamHost does not set any limit on the number of mySQL databases, so you can theoretically create hundreds of small sites on it. They don’t say what the RAM and CPU limits are, but users will get error messages when those limits are reached.

DreamHost automatically backs up your websites and lets you restore one of multiple copies from their control panel. However, they still recommend you use your own backups. As a bonus feature, DreamHost also lets you use up to 50GB of storage for your own personal backups, which other hosts do not allow.

Price

DreamHost is a bit more expensive than the other hosts, at $9/month. The standard coupon code online is for $50 off, though if you look a little harder you can find $97 coupons. Also, some online links can knock the price down to $5.78 / month at the beginning. Occasionally, DreamHost runs special deals where you can get an entire year of hosting for only $9, which is normally the cost of a domain name alone! However, the prices do go up to the standard $9/month after this. This can be a a cheap way to try out web hosting for one year. If you just want to try DreamHost for two weeks, they offer two-week trials, which seem easier to cancel than other web hosts.

Conclusion

BlueHost is probably the best value and most reliable web host for many people, so it is the overall recommended host. However, DreamHost offers certain advantages and less limits, so its also worth considering, especially if you can get a good deal on it.

Thursday, January 19, 2012

Building Websites III - Background to Dynamic Websites

In previous posts I discussed creating static websites. That is fine for a simple website that doesn't change, but normally you will want something more powerful. For example, you might want to store data in a database, or run specific code for specific users. For these things, you'll need a dynamic web host. This means the host doesn't just store and send static web pages, but can run code, edit databases and do various computer tasks. A static web server is basically like a hard drive that can be read by the whole world, while a dynamic server has access to a CPU and RAM also, so it's like a full computer.

On a dynamic web host one can write their own code from scratch to run on the server, but its much easier to install a ready-made script on it. A script is basically a program that runs on your server and can power your website. There are tens of thousands of such scripts available online, and many are free. Some of the most popular scripts are the blogging platform WordPress and the ecommerce platform Magento. These scripts are available for free and let you easily and quickly set up a blog or ecommerce website. Any script that's available online can be downloaded and then manually installed on your web host, but there's often an easier way. Most web hosts come with a "one-click" installer, such as SimpleScripts, for installing the most popular scripts. You can use such a tool to easily install any script that it includes. (See the SimpleScripts script list.)

What if the one-click installer doesn't have the script you need? You will then need to search online for other scripts. A large resource for finding them is HotScripts.com, which includes both free and commercial scripts in many different categories and written in many different programming languages. When you find the script you want, you will need to download it and then follow the instructions for installing it on your server. This will normally involve uploading the script to the location you want, creating a database for it, configuring a file in the script to connect it to the database, and then running the installation file.

Not all web hosts can run any script or programming language. For example, some web hosts cannot run Ruby code. Almost all hosts can run PHP. PHP was once the most popular language for creating dynamic websites, so it has the largest number of available scripts, from WordPress to MediaWiki. So using a PHP script is a good choice if the script is able to handle your needs and you won't need a large amount created from scratch. However, if you plan on creating an entirely new type of site, you might want to pick a language that is more "in" nowadays, such as Ruby. This way, when you (or someone else) begin doing actual coding, you'll be able to take advantage of a well-designed language.

In future posts, I'll compare different web hosts and discuss choosing them. Then I'll posts on some basics about administrating and running your own website.