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
npm i -g surge
Run in a directory that has
index.html etc :
If this is your first deployment, enter your email address and password.
If you’re using Hugo, it’s in
hugo surge public
surge.sh sub domain
You can use the
●●.surge.sh subdomain. But
robots.txt will always output this.
User-agent: * Disallow: /
●●.surge.sh will not be displayed in search results such as Google.
An easy way to use it is to generate a
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
188.8.131.52 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:
- Cloudflare - Recommend
- OVH SSL Gateway
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.
Include the token in the parameter in the deployment environment.
surge . --token (token)
Deployment domain list
Delete deployed site
surge teardown (domain)
If you accidentally delete it, just
surge . again.