Serving an HTML website using a Digital Ocean droplet

I have followed this step by step guide from 2016 to set up my droplet and domain.

how can i simply start a HTML page and start my own page and i want to know how to edit it later Url:

Unfortunately, I cannot reach my website using the browser.

I have followed all the steps above and my domain (from GoDaddy) is pointing to my Digital Ocean droplet (Ubuntu 18.04.3 (LTS) x64). For the domain configuration, I have followed this explanation.

The only thing I have done different is this:

  • I had to create this route /var/www/html manually though. It was not in the droplet when I accessed it.

I was wondering if I am missing anything and if the post above is still accurate after three years. Also, would you recommend anyway to troubleshoot this? Any help would be really appreciated.

Show comments

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Accepted Answer

Thanks so much for your detailed answer @bobbyiliev .

I finally figured it out and solved it.

For future reference:

First, and after creating the droplet, I configured the server:

Initial Server Setup with Ubuntu 18.04 Url:

Then, I installed Nginx instead of apace, following this guide:

How To Install Nginx on Ubuntu 18.04 Url:

Only after that, I followed the steps detailed in this post:

how can i simply start a HTML page and start my own page and i want to know how to edit it later Url:

Bobby Iliev
Site Moderator
Site Moderator badge
December 6, 2019


You would need to make sure that you have a web server like Apache or Nginx installed.

For example if you decide to go with Apache, you could install it with the following command:

  1. sudo apt install apache2

Then once Apache has been installed make sure that it is enabled so that if your Droplet gets rebooted Apache would start on boot:

systemctl enable apache2

Also make sure that Apache is started:

systemctl start apache2

Once you have Apache up and running, then you could go ahead and upload your website to the /var/www/html folder as you mentioned.

Another thing that you need to keep in mind is that your domain name’s A record needs to be pointing to your Droplet’s IP address. And also after each DNS change, it might take up to 48 hours for the DNS cache to clear over the Globe before you could see the changes.

Let me know if anything is unclear.

Regards, Bobby

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Featured on Community

Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.

Become a contributor

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow — whether you're running one virtual machine or ten thousand.

Learn more
DigitalOcean Cloud Control Panel