A Technical Guide To Setting Up Your Website

So you want to host your own web site instead of taking the easy route out with Medium, WordPress and other providers for simple blogs like these – there are a few things you need to set up. This brief guide will help you understand the different pieces to set up and providers you can use for the same. The different pieces are:

  1. Domain name and a Domain registrar
  2. Domain host and a hosting service
  3. DNS Records
  4. Mapping your content to URLs and Sub-Domains

Even though most places offer you an all-in-one service where you can buy a Domain name, hosting and DNS service all from the same provider, these are separate services and nothing constrains you from buying your Domain name from GoDaddy and hosting it somewhere else for example.

Domain Name and Domain Registrar

The Domain Name is the name of your website – the thing you type out in the browser address bar. You would need to buy the name and renew it yearly. You typically use a Domain Registrar to buy and register the domain in your name. Even though you are buying the domain name, you are basically renting it from your registrar for some period of time (typically a year or more) and have to pay regularly to renew your registration so you continue to own the domain. Most Domain Registrars also provide Domain Name Service (DNS) – this is the infrastructure that acts as the address book of the Internet allowing the Internet to identify the address of the server that should get requests for your Domain from a client. My recommendation is using Cloudflare as your Domain Registrar – Cloudflare is doing this at cost (so no mark-up for domains – also, no loss leader tactics like GoDaddy where you get a cheap domain name for a year and then pay a significant mark-up for the next year).

Domain Host and Hosting Service

Now that you have a Domain or Name on the Internet, you need a physical server that will respond to requests made to the Domain name. This is called Domain hosting and there are many hosting server providers. Depending on your need you can pick a good choice for you – for most casual websites, a simple shared hosting provider is good enough. Some common hosting providers include GoDaddy, HostGator, Hostinger among others. Once you register for a hosting provider for your Domain, you will have the IP address of your host which you will need to use to configure your DNS records for your domain.

DNS Records

Typically, you set this up with your Domain Registrar – both hosting providers and Domain registrars provide you with DNS service as well as their own UI for configuring the DNS records for your domain. The main and only records you need to set up are the A record for your Domain and make it point to the IP address that your hosting provider gave for your Domain. If you plan to serve additional sub-domains, you will need to create A records for these as well.

Mapping your content to Domains and Sub-Domains

While a DNS record tells the Internet where a request to a particular Domain or Sub-Domain should go, once it reaches that server, there is additional configuration that allows the server to figure out what content it should serve from its local filesystem (Ok, it’s a little more complicated than that – but as a simplifying assumption it’s not bad). This is typically done in your hosting provider – you set up a map of Domain or Sub-Domain to a directory on the hosting server (typically, the root is decided by the hosting provider and you are picking sub-folders under that root). index.html or index.php in that directory is usually the file that will be served to anyone requesting the Domain.

That is pretty much everything you need to set up a very simple, publicly accessible website from scratch.

Leave a Reply

Your email address will not be published. Required fields are marked *