Question

How to setup a website

  • Posted January 25, 2022
  • HTML

So my question is literally how to setup a website with a droplet? I’ve spent this whole day trying to figure it out and I can’t, I’m on Windows 10 and have FileZilla, I connected to the droplet with root and password, what directory I need to upload my index.html in order for it to be accessible when user requests the file? mydomain.com/index.html I bought the $5 droplet thing Oh yeah lol, my website isn’t even accessible, it’s epicdevsoft.xyz and I put all three nameservers correctly and the website isn’t accessible still

Subscribe
Share

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

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.

Hi there,

What you would need to do is to install a webserver like Nginx or Apache.

You could follow the steps on how to do that here:

https://www.digitalocean.com/community/tutorials/how-to-install-nginx-on-ubuntu-20-04

After that, once the web server has been installed on your Droplet, you have to upload your index.html file to the /var/www/html directory.

Regarding your domain name, you need to do the following:

  • Add the domain name to your DigitalOcean account:

https://cloud.digitalocean.com/networking/domains/

  • After that you need to create an A record for your domain name to point to your Droplet’s IP address. It is a good practice to also add a CNAME record for your www version to point to your main domain.

Keep in mind that once you make that DNS change it could take up to 24/48 hours for the DNS cache to clear over the Globe before you could see the new changes. You can use a tool like this one to keep an eye do the DNS:

https://www.digitalocean.com/community/tools/dns

Alternatively, if you are only having a static website with a single index.html file, what you could do is to use the DigitalOcean App platform as show in this video here:

Let me know how it goes. Best, Bobby