The short answer
EdgeOne Pages differs from Cloudflare:
- It does not map
/abouttoabout.html. - A path ending in
/serves that directory'sindex.html. - A directory path without the trailing slash may 404.
- Flat
.htmlfiles need explicitrewritesinedgeone.json.
Option A: directory output (recommended)
/
├─ index.html → /
├─ about/index.html → /about/
├─ products/index.html → /products/
└─ 404.htmlLink with /about/, /products/. No configuration and no rule limit.
Option B: flat .html + rewrites
{
"rewrites": [
{ "source": "/about", "destination": "/about.html" },
{ "source": "/products", "destination": "/products.html" }
]
}Notes:
- Fields are
source/destination. - Each rule matches one path segment; write multi-level paths explicitly.
- Maximum 100 rules.
- Non-ASCII paths must be URL-encoded.
- Use
{ "source": "/*", "destination": "/index.html" }only for a SPA.
Common mistakes
- Linking
/aboutwhile the file isabout.htmlwith no rewrite. - Missing trailing slash on directory links.
- Too many flat pages and hitting the 100-rule cap.
- SPA fallback on a multi-page site.
- Mixed-case file names.
Checklist
- [ ] Directory output or flat files + rewrites
- [ ] Links match the chosen structure
- [ ] Directory links end with
/ - [ ] Fewer than 100 rewrite rules
- [ ] No SPA fallback on a multi-page site
- [ ]
404.htmlpresent
Copyable prompt
You are a front-end engineer. Build a static multi-page website for [brand / business] for Tencent EdgeOne Pages.
Rules:
1. Use directory output: root index.html; one directory per page with index.html (about/index.html, products/index.html, blog/post/index.html); assets under assets/.
2. Every internal link is a root-relative path with a trailing slash: /, /about/, /products/, /blog/post/. Never link to about.html, never use /about without the slash, never use ../.
3. canonical, og:url, sitemap and JSON-LD use the same trailing-slash URLs.
4. Lowercase file names, digits and hyphens only.
5. No server-side routing, Node, database or build tool; HTML, CSS and vanilla JavaScript only.
6. Include 404.html. Do not add an SPA fallback for a multi-page site.
7. If flat .html files are required, also output edgeone.json with a rewrite per page and mention the 100-rule limit.
8. Output the full file list and every file's full content; no ellipses.
9. Write the copy in [language].About the author
Bweb Editorial TeamContent and editorial
Turning first-hand building, publishing, domain and acquisition work into steps readers can follow.
Reviewed by: SHUOFENG
Facts are checked by a person before publishing; AI only assists with drafts and translation.
Editorial standards