我第一次部署网站的时候,Google了半天:要买服务器吗?要装Nginx吗?要会Linux命令吗?
答案是:都不需要。
下面是我用 Netlify Drop 部署本站的全过程,零基础照着做就行。
在部署之前,先确认你的网站文件夹结构是这样的:
📁 my-website/
├── 📄 index.html ← 必须有,这是首页
├── 📄 style.css ← 样式文件(如果有)
├── 📄 main.js ← JS文件(如果有)
└── 📁 articles/ ← 子页面文件夹(如果有)
└── 📄 some-article.html
index.html 文件,而且必须在文件夹的根目录。Netlify 会自动把它当作首页。
如果你是用 AI(比如DeepSeek)生成的网站代码,通常会得到3个文件:index.html、style.css、main.js。把它们放在同一个文件夹里就行。
这是最简单的方法,不需要注册账号,拖进去就能用。
浏览器访问:https://app.netlify.com/drop
你会看到一个很大的拖拽区域,写着 "Drag and drop your site folder here"。
有两种方式:
上传进度会显示在页面上。文件越多、越大,时间越长。一般几十个文件的话,10-30秒搞定。
上传完成后,页面会自动跳转到你的新网站!
Netlify 会给你一个随机的二级域名,格式像这样:
https://capable-cannoli-90df99.netlify.app
这个地址就是你的网站了!发给别人,他们就能访问。
✅ 到这一步,你的网站已经上线了!
上面方法一的缺点是网站1小时后会过期。要永久保留,需要注册一个免费账号。
访问 https://app.netlify.com/signup,可以用 Email 或 GitHub 账号注册。
推荐用 Email 注册,简单快捷:输入邮箱 → 设置密码 → 验证邮箱 → 完成。
注册并登录后,再走一遍方法一的步骤(打开 drop 页面 → 拖入文件夹)。
这次上传完成后,网站会永久保留,不会再过期了。
Netlify 默认给你的域名是一串随机英文(像 capable-cannoli-90df99),不太好记。
想改成自己想要的的名字:
my-ai-tools)https://my-ai-tools.netlify.app注意:名称不能跟别人的重复,得碰运气。
修改了网站代码后,怎么更新到线上?
很简单,重新 Drop 上传一次就行:
每次部署,Netlify 都会保留历史版本。如果更新后出问题了,可以随时"回滚"到之前的版本。
99% 是因为文件夹里没有 index.html,或者 index.html 不在根目录。
检查:打开你的文件夹,确认 index.html 直接在里面,不是藏在子文件夹里。
检查 index.html 里引用 CSS 的路径是否正确。
如果 CSS 文件跟 index.html 在同一个文件夹里,引用应该是:
<link rel="stylesheet" href="./style.css">
如果路径写错了(比如写了绝对路径 C:\Users\...),部署到 Netlify 后就找不到了。
www.yoursite.com)对个人项目来说,免费版完全够用。
Netlify 的服务器在国外,国内访问有时会慢或打不开。
备选方案:
本站目前部署在 Netlify,域名是 capable-cannoli-90df99.netlify.app。
选择 Netlify 的原因:
如果后续国内访问问题严重,我会迁移到 GitHub Pages 或 Cloudflare Pages。
— 小卡拉米,2026.06.22(最后更新:2026.06.23)
The first time I deployed a website, I Googled forever: do I need to buy a server? Install Nginx? Learn Linux commands?
The answer: none of the above.
Below is the exact process I used to deploy this site with Netlify Drop—just follow along, no experience needed.
Before deploying, confirm your website folder structure looks like this:
📁 my-website/
├── 📄 index.html ← required, this is the homepage
├── 📄 style.css ← stylesheet (if any)
├── 📄 main.js ← JS file (if any)
└── 📁 articles/ ← subpage folder (if any)
└── 📄 some-article.html
index.html file, and it must be in the root of the folder. Netlify automatically treats it as the homepage.
If you generated your site code with AI (e.g., DeepSeek), you'll usually get 3 files: index.html, style.css, main.js. Just put them in the same folder.
This is the simplest method—no account needed, just drag and go.
Visit in your browser: https://app.netlify.com/drop
You'll see a big drag-and-drop area that says "Drag and drop your site folder here".
Two ways to do it:
Upload progress shows on the page. More/larger files take longer. For a few dozen files, it's usually done in 10-30 seconds.
Once the upload finishes, the page automatically redirects to your new website!
Netlify gives you a random subdomain in a format like this:
https://capable-cannoli-90df99.netlify.app
That address is your website! Send it to anyone and they can visit it.
✅ At this point, your website is live!
The downside of Method 1 is that the site expires after 1 hour. To keep it permanently, you need a free account.
Visit https://app.netlify.com/signup—you can sign up with Email or a GitHub account.
Email is the quickest: enter your email → set a password → verify the email → done.
After registering and logging in, repeat the Method 1 steps (open the drop page → drag in the folder).
This time, once the upload finishes, the site is kept permanently and won't expire.
By default Netlify gives you a random English string as your domain (like capable-cannoli-90df99), which is hard to remember.
To change it to a name you like:
my-ai-tools)https://my-ai-tools.netlify.appNote: the name can't clash with anyone else's—you'll need some luck.
After changing your site's code, how do you push updates live?
Easy—just Drop upload again:
Netlify keeps a history of every deploy. If an update breaks something, you can "roll back" to a previous version anytime.
99% of the time it's because the folder has no index.html, or index.html isn't in the root.
Check: open your folder and confirm index.html is directly inside it, not hidden in a subfolder.
Check whether the CSS path referenced in index.html is correct.
If the CSS file is in the same folder as index.html, the reference should be:
<link rel="stylesheet" href="./style.css">
If the path is wrong (e.g., an absolute path like C:\Users\...), it won't be found after deploying to Netlify.
www.yoursite.com)For personal projects, the free plan is more than enough.
Netlify's servers are overseas; access from mainland China can be slow or fail sometimes.
Alternatives:
This site is currently deployed on Netlify at capable-cannoli-90df99.netlify.app.
Why I chose Netlify:
If access from mainland China becomes a serious problem later, I'll migrate to GitHub Pages or Cloudflare Pages.
— Xiao Kalami, 2026.06.22 (last updated: 2026.06.23)