How do I put up a simple, static website?

I am very to new web development and I am simply trying to put up a web page that just says “Hello, world”. I would like to build a portfolio page to post the work that I’ve done in my programming classes but am unsure as to what I need to do have my simple webpage show up. I feel like I am missing a step or series of steps and maybe I just don’t understand everything that is required but this is what I have done (successfully…I believe) thus far:

I don’t know what the next steps are. I have uploaded an html file but that’s where I feel like I am missing something. After I’ve uploaded it, is that it? Is there something significant that I am missing?

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Hi @coolinmc6

You’re definitely on the right track! After setting up the DNS records so that your domain points to your Droplet’s IP address, and securing the Droplet (initial server setup), all you need to do is install a webserver and upload the files that it should serve.

The most popular webservers are Apache and Nginx. Nginx performs much better than Apache at serving static files, so I would recommend going with that. Take a look at this tutorial:

Once you’ve followed it and installed Nginx, you’ll want to configure it to use a new path for the files. While you can use almost any path you want, I personally prefer /srv/www. Create that directory, and another directory in it for your domain name in order to make it easier to add other websites with different domain names in the future:

sudo mkdir /srv/www /srv/www/

Then, configure nginx to serve files from that directory. Open /etc/nginx/sites-available/default in your favorite text editor and update the line with the root directive such that it looks as follows:

    root /srv/www/;

Restart nginx in order for the changes to take effect:

sudo service nginx restart

Finally, change the directory ownership to your own user so that you can write to it:

sudo chown -R user:user /srv/www

And you’re done! You can now upload your website’s files using FileZilla to /srv/www/, which you should then see at

This comment has been deleted

i tried to edit the root line using nano

after editing

i clicked ctrl-x and inputted Y

i got this

**[ Error writing /etc/nginx/sites-available/default: Permission denied ] ** please i need help urgently