Even as a developer, from time to time you might get confused about the exact steps to take when you what to register a domain and create some hosting for it, with minimal costs.
I will not go completely into detail on how to use everything, mainly because many of the following tools are quite easy to use, thanks to intuitive interfaces. But I will preset the general ideas and give you enough information to handle the job.
Oh, this article does not contain paid referral links, so beside sharing information, there is no other hidden purpose with it.
I hope the descriptions below are formulated clearly enough so that a non-technical person can get a good representation of what needs to be setup behind the scenes, so that writing www
in your browser would link to a website.
The domain name
Regardless of how you will solve the hosting problem, you will not be able to avoid the effort of picking the right domain name for your needs.
Choosing the domain name is probably the most complicated part of building a website. The one you pick must fit your purpose, your business, must follow some SEO rules and.. most important: should be available.
Some tips for this:
- https://www.godaddy.com/garage/10-tips-for-choosing-the-perfect-domain-name/
- https://www.theedigital.com/blog/how-to-choose-the-right-domain-name
The easier ways
The easy way to go about having your own website is solving the problems below with the help of only one provider. For a long time, I have used a Romanian local shared hosting provider – romarg.ro – and then switched to my VPS from DigitalOcean. I am still curious about services from hostgator.com or dreamhost.com.
On the upside, most of the big hosting companies offer cPanel support, which is a very common, powerful and well documented interface for handling hosting operations.
On the downside, though: at times a domain registered with such hosts might be owned by the company itself or might have restricted properties.
And a neutral observation: with using a solution like the above, you lose some of the control over what you can do on your server or related to your website. This might seem a downside, but it compensates with more security and less complexity.
The more complicated ways
Domain registration
Once you do pick your domain name, the next step is to pick your registrar. You can use a local one (e.g. rotld.ro for .ro domains) or you can go with godaddy.com . I have used the latter for several years and can say I am quite happy with the services.
You can find more detail on how to buy a domain from godaddy.com here:
https://www.techomoro.com/how-to-buy-a-domain-name-from-godaddy/
Nameservers
The link between the domain name and the hosting server is done by using domain name servers (DNS). When configuring the domain, you should introduce mainly one of these:
- the nameservers indicated by your hosting provider;
- the address of your dns servers – should you own one or more;
- the IP address of your server – this is the easiest way, but also the least desirable, as changing the IP address of your server might lead to unexpected complications.
Once updated, you might have to wait for a few hours until the changes are propagated. After the changes are propagated, the indicated DNS resolver (once of the three options above) will be responsible of handing your different types of DNS entries.
Hosting
My choice is for using your own VPS, with Virtualmin, which is an amazing tool. A while back I have written an article about how to setup a Virtualmin based shared hosting server with Ubuntu, on a DigitalOcean droplet.
https://draghici.net/2018/09/15/virtualmin-hosting-on-ubuntu-16-04-x64/
DNS for the VPS
Setting the nameservers towards your hosting server on your domain registrars page is just the first step. The next step is to create the DNS entries with your hosting provider. You usually need the following records:
- an
A
entry – A records are for IPv4 addresses only and tell a request where your domain should direct to; - a
CNAME
entry – CNAME records act as an alias by mapping a hostname to another hostname – mainly to match subdomains.
A basic WP website
After you setup your server, you must log into your Virtualmin interface and create the new account. Download the latest WP version, upload it to the freshly created account and follow the installation process.
Setting up your own email server is not necessarily a complicated process. However, if you set it up, it will always need attention – it must be up to date, the uptime of the server must be as close as possible to 100%.
For the moment, I would recommend using a third party provider. My choice for that is zoho.com – it has a free plan which is quite good. Also, for the moment at least, their reviews on privacy are quite good.
DNS for email hosting
Setting up some DNS entries is also necessary for receiving emails. They are called MX records and they will be provided by your email hosting.
Probably already obvious, the priority shows the order of preference between the specified values. The values 10
, 20
and 50
are the recommended values.
Digitalocean and Zoho
For applicability, the two providers have been selected as examples. So the following values are to be set for using DigitalOcean as your VPS hosting provider and Zoho as your email host.
Registrar settings for DigitalOcean nameservers
- ns1.digitalocean.com
- ns2.digitalocean.com
- ns3.digitalocean.com
DNS settings
Once you have updated your registrars nameservers, you must also create the A
and CNAME
entries in the Networking page of DigitalOcean, so that a link exists between the name and your previously created VPS/droplet.
The following MX settings (the number is the priority) need to be set for using zoho.com as your email host:
- mx.zoho.com – 10
- mx2.zoho.com – 20
- mx3.zoho.com – 30
Zoho mail
For now, we are going to use the free plan provided by Zoho. You can start here: https://workplace.zoho.com/orgsignup.do
More information about setting up Zoho mail:
https://www.zoho.com/mail/help/adminconsole/email-hosting-setup.html
If you want to keep using an existing email address, you can setup email forwarding towards your existing accounts.
A closing note
The above is not as much a step-by-step guide, but a an overview of what happens around a having your own domain name and your own cool email addresses. It’s an honour to have you all the way to the end of the article and.. if you are completely new to hosting stuff, welcome! 🙂