Sometimes things are pretty simple and you want to keep them simple. It’s your simple one-page landing page or CV or portfolio. You don’t want to set up Digital Ocean droplet or AWS S3 for that. You don’t want to configure web server and go through the hassle. All you want to do is simply put up the page on the web and direct your domain to the IP address. Been there, done that.

I recently hosted and made a simple one-page website live — all under 10 mins. Here is how I did it:

Write the HTML and CSS code for your page. Create a directory/folder in your machine and add the HTML and CSS files. Add images, CSS, js folders and relevant files in the main folder.

Here is the folder structure for example: Main directory (my-website)

— css

— style.css

— js

— main.js

— img

— logo.png

— header.png

— index.html (this is your homepage)

— my-page.html (some other page on your static website)

3. Check if index.html works on your machine and is ready to be uploaded on the web.

4. Open terminal on Linux and Mac; command prompt on Windows.

5. Ensure you have a recent version of Node.js. If you don’t have it installed, here is a tutorial:

Install Node JS on Windows

Install Node JS on Mac

Install Node JS on Linux

Not sure if it’s installed or not? Just type node -v and if you get the version, it is installed. Make sure it is updated.

6. Then, install Surge using npm (Node Package Manager) by running the following command:

npm install — global surge

7. Now, go to the directory (my-website) in your terminal/command prompt. If you don’t know how to browse through the directories, follow this simple tutorial: https://www.macworld.com/article/2042378/master-the-command-line-navigating-files-and-folders.html

8. Once you are in the directory:

type

surge

and press enter.

9. Your directory is now published on the web. You will see the IP address of the server.

That’s it! You will get an IP address that you can add to your nameservers (Godaddy, Cloudflare etc). Here is a tutorial for adding custom domains.