Home / Articles / Web Hosting Guides / Hosting Your Own Website

How to Host Your Own Website with a Hosting Provider or Locally

Hosting a website means making sure that your website can be accessed on the Internet. There are two ways to get the job done: One, host your site with a web hosting company; and two, host it locally on your own server.

The good news is that the process of hosting your own website is fairly easy today and you don’t need to be an expert in web development. We will look into both methods in this article.

Host Your Website with a Web Hosting Service

Using a web hosting provider is the simplest way of hosting a website. You can pay a small monthly fee and rely on the service provider to take care of all your equipment, infrastructure, and other associated needs.

Potential benefits and drawbacks

Pros

  • Usually cheaper
  • Support is often readily available
  • No need for hardware maintenance
  • Higher reliability

Cons

  • Maybe some service restrictions
  • Fewer choices in hosting locations

Here are the five steps to host a website with a hosting service provider.

  1. Decide which types of website you are building

    There are two main types of websites – static and dynamic. Simple static websites can be built using a What You See Is What You Get (WYSIWYG) application and then transferred over to the hosting account. Dynamic sites are mainly application-driven and make use of scripts, databases, and other tools to generate some portions of the site on the fly.

  2. Compare web hosting types

    In a nutshell, the most common types of hosting are: Shared, VPS, Cloud, and Dedicated Server Hosting. Shared hosting is the cheapest and easiest to manage. As the type of web hosting scales up, so too does the cost involved and often the complexity of managing the hosting account.

  3. Select the right web hosting plan

    The key difference in web hosting plans often lies in the amount of resources that each gets. The more resources your site has, the more visitors it can handle. Also keep a look out for value-added features such as free SSL, domain name, advertising credits, an included website builder, or other items which can help you build or market your site.

  4. Purchase a domain and point it to your nameservers

    Purchase your domain name once you have decided. Then setup DNS for your new website.

  5. Create and move your website to the server

    If you have built your website locally (on your own computer) then simply transfer our files onto your web server. To do this you can either make use of the File Manager in your web hosting control panel or make the transfer using an FTP client.

1. Build Your Website

Decide which type of website you are building

There are two main types of websites; static and dynamic.

Simple static websites can be built using a What You See Is What You Get (WYSIWYG) application and then transferred over to the hosting account.

Dynamic sites are mainly application-driven and make use of scripts, databases, and other tools to generate some portions of the site on the fly. WordPress and Joomla are examples of common Content Management System (CMS) apps that are popular today. Others such as Magento and PrestaShop are used for eCommerce websites.

Hostinger Pricing
Your web host selection depends on the type of website you are building. A budget web host like Hostinger ($1.99/mo) would be sufficient for a simple static website; whereas dynamic sites will require more server resources.

I have discussed in detail the process of creating a website in a different guide. For those looking to build a website, here's my step-by-step website-building tutorial.

2. Compare Web Hosting Types

What is web hosting?

Web hosting is a computer where people store their websites. Think of it as a house where you store all your stuff; but instead of storing your clothes and furniture, you store computer files (HTML, documents, images, videos, etc) in a web host.

What is the role of a web hosting company?

Web hosting company rent out their computers/servers to store your website and provide Internet connectivity so that other users can access the files on your website.

Much like there are many different categories of cars, website hosting also comes in various flavors. For example, basic shared hosting is the cheapest and easiest to manage.

As the type of web hosting scales up, so too does the cost involved and often the complexity of managing the hosting account. For example, in VPS hosting you would need to manage not just the hosting details but also the environment that it is being hosted in.

Four types of web host

In a nutshell, the four common types of hosting are shared, VPS, dedicated server, and cloud hosting. In terms of performance and management, each web hosting type also has their own pros and cons so choose yours accordingly.

Shared Web Hosting
Shared Hosting is often cheap and easy to manage but does not come with advanced controls and is not able to handle high volumes of traffic. You can get shared hosting services from A2 HostingHostingerGreenGeeks
VPS Web Hosting
VPS / Cloud Hosting is more expensive and very versatile. Users can install almost anything they will need on these accounts and be able to cope with varying volumes of traffic depending on how much resources are paid for. You can get VPS or Cloud hosting services from Digital OceanInterserverInMotion Hosting.
Dedicated Web Hosting
Dedicated Servers are the most complex to manage and cost the most. They are very powerful and can be managed right down to the hardware level by administrators. AltusHostInMotion Hosting, and TMD Hosting provide dedicated hosting services.

What about WordPress Hosting?

It’s important to know that web applications and web hosting are not the same thing.

Some web hosts offer plans such as WordPress Hosting, PrestaShop Hosting, WooCommerce Hosting, and so on. These are not really hosting types but are intended to attract laymen who may not be familiar with real web hosting terms. These hosting offers merely entice users with the names of popular web applications.

For example, not many people might know the difference in hosting types, but many will recognize the term ‘WordPress’.

The type of web hosting you will need is typically defined by:

  1. The volume of traffic you expect on your website, or
  2. Any specific needs your website might have.

Most websites that are just starting out will typically have low traffic volume (i.e. few visitors) and shared hosting accounts will be fine for those. Most shared accounts will also come with application installers (such as Softaculous), but to ensure that your needs are met, ask the host if the application you want can be installed on the account you’re looking at.

3. Purchase a Web Hosting Plan

Even within hosting types, service providers often have a variety of plans available. The key difference in these plans often lies in the amount of resources that each gets. The more resources your site has, the more visitors it can handle.

When it comes to resources on web hosting, we are typically referring to three core items – processor (CPU), memory (RAM), and storage (NVMe, SSD, or HDD). These however do not always translate to good performance of a web host.

In the past, there hasn’t been an easy way to gauge the performance of a web host. Most users had to rely on reviews which, unfortunately, normally only take snapshots of a host’s performance and seldom update that. To get past this, try using HostScore, a site that constantly rates the performance of web hosts based on ongoing data collection. This means that their web host performance assessments are much more accurate.

Also keep a look out for value-added features such as free SSL, domain name, advertising credits, an included website builder, or other items which can help you build or market your site.

A2 Hosting Pricing
Some web hosts also offer other advantages on more expensive plans such as special optimizations or enhancements. A good example of this is the shared hosting plans on A2 Hosting. The most expensive plan on that series come 20X ‘Turbo’ speeds.
Hostpapa Welcome Email
Usually right after you purchased a web host, you will receive a welcome email with details on your login credential and name server. Keep this email safe – you'll need the information to configure your domain and login to your server control panel. Screenshot showing my welcome email from HostPapa.

After testing and reviewing more than 70 hosting services in the past, I was able to narrow down some best hosting options for different use cases. See my recommendations in this guide.

4. Register a Domain

What is a domain name?

A domain name is not something physical that you can touch or see. It is a string of characters that gives your website an identity. Examples of domain names are Google.com, Alexa.com, Linux.org, eLearningEuropa.info, as well as Yahoo.co.uk.

What is sub domain? What is TLD? What is domain name?
Domain Name explained.

How to own a domain name?

To own your own domain, you will need to register your domain with a registrar.

Many web hosting plans today will come with a free domain name, so make sure to check if that is applicable to the web hosting you intend to buy. If so, you can take care of the domain name at the same time as when you pay for your web hosting plan.

If not, you’ll need to buy a domain name separately. This can be done either from the same place where you bought the hosting plan or from another service provider. If you need to buy the domain name separately, I highly recommend you look elsewhere.

Domain names are not fixed-price items and often go on sale. Some providers often have cheap sales on domain names and if you’re lucky you can pick one up for a steal. Namecheap for example often had domain names on offer at up to 98% off.

The exception to this is if you are a first-time site owner. In that case, buying a domain name and hosting from the same service provider might make things easier for you to work with as a beginner.

Point your domain to your nameservers

Once your domain is ready, you need to point your domain name to the right nameservers.

This process is known as Domain Name System (DNS) setup. The Domain Name System (DNS) is the phonebook of the internet, responsible for translating your website's domain name into the corresponding IP address that computers understand. When you set up your DNS, you're essentially telling the internet where to find your website.

The process typically involves updating DNS records on the platform where you purchased your domain. The basic DNS records you need to set are “A Record”, which points your domain to your hosting provider's IP address; and “CNAME Record”, often used for www versions of your domain. Optionally, you might need to set up “MX Records”‘ for email routing if you have a business email associated with your domain. These changes can take up to 48 hours to propagate globally due to DNS caching. Ensure you have a full understanding of your hosting provider's instructions or consult with a network specialist if needed, as incorrect settings can render your website inaccessible.

5. Move Your Website to Server

Free website migration support - example.
Example: To initiate a website transfer at GreenGeeks, login to your user dashboard > My Services > Site Migration Request > Select a Service.

Once your domain name and web hosting plan is ready it’s time for migration. Site migration can be complex, so if you’re doing this for the first time, ask for help from your new host. Some web hosting companies offer free site migrations.

If you have built your website locally (on your own computer) then simply transfer our files onto your web server. To do this you can either make use of the File Manager in your web hosting control panel or make the transfer using an FTP client.

The process is similar to copying files from one place to another on your own computer.

Host Your Website Locally on Your Own Server

Hosting a website locally refers to using your own computer to set up a web server from scratch and store your website in it. When hosting a website from your home, you will be responsible for everything from the hardware and software all the way to bandwidth provision and other infrastructure needs.

Potential Benefits and Drawbacks

Advantages

  • Extreme control over your hosting environment
  • Potential for faster service turnaround times
  • Your choice of equipment and service providers

Disadvantages

  • Can be very expensive
  • Not always possible in residential environments

Hosting a website on a local server is complex and can be very expensive. It is also often less reliable than hosting with a service provider. If you insist, below are the three steps to follow.

1. Set Up Your Server

Before you can host a website locally, you'll need to understand the primary requirements involved in the process. These include hardware, software, and network requirements, as well as a clear understanding of your website's needs in terms of traffic, content, and functionality.

Hardware Requirements

Your website will be hosted on a server, which is essentially a specialized computer. The hardware specifications of this server will significantly impact the performance of your website.

hosting a website at your own server
Sample of an HP SMB Server (source)

Basic server hardware can be very similar to the hardware on your own PC with some slight differences. In fact, technically, you could take your own PC (or even laptop) and turn it into a home web server if you really wanted to.

The key difference is in how reliable you want your web server to be and the visitor volume it can handle. As with service providers, you will need to keep an eye on the processor, memory, and storage space.

If you opt for high-end server equipment such as a rack server, you will also need to ensure that the specialized needs of this equipment are met. This includes space, cooling, and power.

If you need the service to be more reliable you will also need to consider redundancy in hardware. For example, setting up your server storage drives in RAID, plus active mirroring of backups onto additional drives.

Your other infrastructure equipment such as routers and modems will also need to be able to handle high loads of traffic.

Software Requirements

Websites require specific software to function. This includes a web server like Apache or Nginx, a database management system like MySQL, and potentially a server-side scripting language like PHP and a content management system (CMS) like WordPress.

Hosting a site locally also means that you need to be responsible for not just configuring the software, but also for licensing.

2. Ensure Sufficient Network Bandwidth

Hosting a site from home requires a robust and reliable internet connection. In many cases, most of us are fine with standard Internet bandwidth since we’re using limited connections to the Internet. Imagine if 30 people were trying to use your home Internet at the same time – that, and perhaps more, is what you might be looking to support.

You'll also need a static IP address so that your website can be consistently found at the same location. Most home Internet plans come with dynamic IPs assigned. In order to run a web server, you need a static IP. This can either be handled by a service provider such as DynDNS or by buying the service from your Internet Service Provider (ISP).

Learn how to calculate the bandwidth you need.

3. Deploy Your Website

The next part is similar to the experience of using a web hosting provider, except that you don’t get any support. Your web files need to be moved onto your web host in order for your site to start functioning.

More Tips on Hosting & Managing Your Web Host

Which is the Best Way to Host Your Own Website?

As you can probably tell from the two examples here of using a hosting provider or self-hosting a website, the latter can quickly become incredibly expensive and complex. In reality, it is! Believe me, I have done it before.

Aside from the satisfaction of having done it, there are few real benefits of doing so unless you are a business that has very specific needs for your site. Some of these might be legal or corporate requirements, for example.

However, web hosting service providers today have become very versatile and in many cases are open to discussing special needs with customers. In the majority of cases though, using a standard hosting plan is usually more than enough.

Managing Your Hosting Server Resources

Hosting a website – especially if you opt for hosting locally, is never a setup-and-forget task. Server resources management will become more and more important as the popularity of your website grows. This is especially true when you have multiple websites hosted under the same server.

Some time ago we interviewed Marc Werne, a staff member of Linux hosting provider Gigatux.com, and asked for his advice on server resources management. Here are some of his tips on making your resources last.

Choose a lightweight CMS

You may want to use Joomla or Mambo so badly, but if your hosting storage has less than 500MB, you may want to reconsider your choice.

WordPress or Drupal, for example, would make a lightweight, flexible alternative that will save you MBs of web disk and bandwidth. Often less is more and lightweight doesn't equal less functional. Make a chart of your alternatives and choose the CMS that mostly suits your needs and your hosting package.

Use miniBB instead of SMF for a forum website

MiniBB only takes less than 2 MB against the 10+ MB of SMF, yet it's a complete forum solution with a meaty repository of add-ons, extensions, and plugins.

Not fond of miniBB?

There are several lightweight alternatives against bigger forum scripts. PunBB, FluxBB, and AEF to cite a few. Also, plan the scope of your forum before installing any solution: if your goal is to reach thousands to millions of users, an upgrade of your hosting package may be required. If you want to keep the forum staff-only or aimed at a small number of users, by all means, use the resources you have available to your advantage.

Here's more on how to start and run a forum website.

Use a third-party newsletter provider

Install a newsletter software on your limited web hosting account and it will start eating up your disk and bandwidth. Unfortunately, there is not much to do about it, and the smallest available newsletter script — OpenNewsletter — is still 640Kb and you'll have to count on all the storage issues, too.

In comparison – MailChimp, is a complete newsletter solution starting at zero cost if your target audience is less than 2,000 subscribers and you aim at sending not more than 12,000 emails per month.

All templates can be customized so you don't need to host your own, and you can integrate the newsletter with Facebook.

A good alternative to MailChimp is Constant Contact, whose only limit is given by subscription options – people can only signup from your form.

Employ a caching system

The majority of small business and personal website owners on a low budget opt for shared hosting packages in order to save on investment. Sometimes an upgrade is by all means necessary to increase performance and welcome a wider audience and the traffic it generates, but if you can't, you can save server resources by employing a caching system that doesn't overload your CPU.

WordPress users can install WP Rocket but if you don't use WordPress you should try to optimize your website cache with the tools made available by your CMS vendor. For instance, Joomla can count on Cache Cleaner or Jot Cache; while Drupal has several cache performance tools as well.

Regularly empty spam content

Get rid of spam in the form of emails, blog comments, pingback URLs and files that overload your servers and database quota.

Do it at least once a week to avoid memory issues (e.g. WordPress comment deletion only works up to a memory of 64MB, after which you'll get a fatal error and you will have to either increase the allowed memory size in your PHP.INI file or in wp-config.php within your WordPress root).

Use external databases whenever possible

If your host allows remote database linking, by all means, use it. External databases help lighten the usage of your web disk quota because they store your content outside of your hosting account. However, keep in mind that remote databases can be quite expensive and a hassle to the end users.

Use third-party file hosting services

Host all things downloadable on an external file hosting service, such as Photobucket, Vimeo, YouTube, Giphy, and so on.

You should not allow your visitors, clients, or readers to upload content on your servers if your resources are limited.

Regularly download and delete log files

Log files were created to keep you informed of your website health, but there's no use of them on the server: if you don't download and remove them at least once a week, their size will grow to occupy several megabytes to a GB. This is especially true of two cPanel logs:

/home/user/public_html/error_log

and

/home/user/tmp/awstats/

The error_log file usually includes dynamic errors such as PHP warnings, database errors (illegal collations, etc.), and spam comments that didn't go through. Check this file weekly for errors and warnings, then remove it.

The /awstats/ folder, on the contrary, contains all access logs and statistics logs for your website. You should disable the AwStats software in your account to avoid webspace usage increase as the program automatically stores its stat files, or if you can't because of restricted privileges, you should contact your host and ask to disable all analytics software.

FAQs About Hosting Websites

What is a web host?

Web hosting is more than simply the space your website sits on. It also encompasses software needs and costs, along with bandwidth and a ton of other micro-needs that need to be managed.

Why everyone is hosting their website with a hosting company?

Web hosting service providers have set up environments that are dedicated to hosting websites. They are optimized for this purpose and because they do it in bulk, they often are able to provide the service much more cheaply than the self-hosting environment.

Is a domain name a must to run my website?

A domain name is the address of your website. Without it, your users will have no way to get to your website unless they know the exact IP address. Learn more about how do domain name works.

Does GoDaddy host websites?

Yes, GoDaddy is a web services provider and one of its products is web hosting.

Is shared hosting enough for my site?

If your website is new, shared hosting is usually more than enough. The capacity of shared hosting differs from host to host. Some web hosts, for example, A2 Hosting, have very strong plans even among shared hosting options.

How many types of hosting are there?

There are four main types of web hosting, they are shared, VPS, Cloud, and dedicated hosting. Each offer varying degrees of performance, reliability, and security.

Which type of hosting is best?

“Best” is relative – what's best for my website might not be right for yours. Typically if you are new, shared hosting should be the “best” place to get started. Dedicated servers are the most powerful types of hosting but they are the most expensive too (hence not recommended for newbies).

Can I use WordPress on my web host?

Most web hosting service providers today allow you to install a variety of popular web applications. This usually includes WordPress, Drupal, Joomla, and a host of others. To be sure the application you want can be installed it is best to check with your service provider.

Why is my website slow?

Website speed can depend on many factors. One of these is how well your website is optimized. To learn what is affecting your site performance, use a tool like WebPageTest or GT Metrix. Running a test here will break down the details of load times, enabling you to identify lag points in your site’s loading time.

How does hosting a website work?

Hosting a website involves a web server that is designed to serve your website files to visitors over the Internet. The key components involved are the files of your website, a web server, and a domain name via which your site is accessed.

What is cloud hosting?

As the name implies, shared hosting accounts ‘share’ the resources of a single server. In Cloud hosting, multiple servers pool their resources into a ‘Cloud’ and these resources are then portioned out onto Cloud hosting accounts.

What is managed hosting?

“Managed Hosting” is a type of web hosting where the service provider takes on the responsibility of maintaining the technical performance of your account. This will usually encompass technical and software updates.

Photo of author

Article by Jerry Low

Keep Reading