Step 1: Go to Namecheap.com and purchase a domain name.
A domain name can be purchased for as little as $1 per year. Domain name prices are determined by a variety of factors, however the following are the most prevalent reasons why some are more expensive than others:
Top-Level Domain (TLD) names such as.com are among the most expensive domain names. Domain names start at roughly $8.88.
The shorter the domain name, the higher the cost. Consider domain names like fb.com, t.co (Twitter), and so on. For example, when I purchased my domain name ron.sh, it cost roughly $35. (because there was a discount).
One-word domain names are prohibitively expensive. Voice.com, for example, was sold for $30 million.
Step 2: Open a DigitalOcean account.
Create a DigitalOcean account to host your website.
Step 3: Make a Droplet
If you don’t need it right now, you can skip this step. After you’ve configured the DNS, you’ll need to point your domain name to a droplet.
Click the Get Started with a Droplet button.
The most basic package costs roughly $5 per month and is sufficient to set up a small web server.
Step 4: Configure DNS
1- In the DigitalOcean dashboard, go to Networking and enter the domain name you purchased from Namecheap.com. Click the Add Domain button.
2- Enter “@” in the HOSTNAME field and choose the droplet in the WILL DIRECT TO field before clicking the Create Record button.
3- Access your Namecheap.com dashboard, locate your domain name, and select the Manage button. Select Custom DNS under Domain > NAMESERVERS and type the following and click the checkbox next to Custom DNS:
ns1.digitalocean.com ns2.digitalocean.com ns3.digitalocean.com
STEP 5 – Confirm and Verify
DNS propagation takes roughly 24 hours by default, but in my experience, it only takes a few minutes using Namecheap and DigitalOcean. Because most droplets include Nginx, you will see the following when you navigate to your domain (e.g., http://my-domain-name.com). If you are unsuccessful, wait a few hours to 24 hours before attempting again.