Surge (surge.sh) can be quickly deployed on a static site with the CLI.
It’s free and no restrictions on the admin site and bandwidth.

🎈 Surge (surge.sh) | γ΅γ†γ›γ‚“πŸŽˆ FU-SEN - πŸ—Ύ ζ—₯本θͺžζƒ…ε ±


Table of Contents


Install

npm i -g surge

Deploy

Run in a directory that has index.html etc :

surge .

If this is your first deployment, enter your email address and password.

Not Found 404.html works.

If you’re using Hugo, it’s in public/. Therefore:

hugo
surge public

surge.sh sub domain

You can use the ●●.surge.sh subdomain. But robots.txt will always output this.

User-agent: *
Disallow: /

Therefore, Therefore, ●●.surge.sh will not be displayed in search results such as Google.


Custom Domain

An easy way to use it is to generate a CNAME,
file and put your custom domain here. This is the same as GitHub Pages.

The custom domain will point to na-west1.surge.sh using the CNAME zone.
If it is not a subdomain, you may be able to use ANAME or ALIAS instead.
If this also doesn’t work, point to 45.55.110.124 on the A record.

Surge does not apply SSL when using a custom domain with a free plan.
You can solve this by going through other services:


Token

It can be used for deployment with CI/CD such as GitHub Actions.

First, issue a token on the local PC you are logged in to.

surge token

Include the token in the parameter in the deployment environment.

surge . --token (token)

Deployment domain list

surge list

Delete deployed site

surge teardown (domain)

If you accidentally delete it, just surge . again.