• Product Introduction
  • Quick Start
    • Agent Development
    • Importing a Git Repository
    • Starting From a Template
    • Direct Upload
    • Start with AI
  • Framework Guide
    • Agent
    • Frontends
      • Vite
      • React
      • Vue
      • Hugo
      • Other Frameworks
    • Backends
    • Full-stack
      • Next.js
      • Nuxt
      • Astro
      • React Router
      • SvelteKit
      • TanStack Start
      • Vike
    • Custom 404 Page
  • Project Guide
    • Project Management
    • edgeone.json
    • Configuring Cache
    • Building Output Configuration
    • Error Codes
  • Build Guide
  • Deployment Guide
    • Overview
    • Create Deploys
    • Manage Deploys
    • Deploy Button
    • Using Github Actions
    • Using Gitlab CI/CD
    • Using CNB Plugin
    • Using IDE PlugIn
    • Using CodeBuddy IDE
  • Domain Management
    • Overview
    • Custom Domain
    • HTTPS Configuration
      • Overview
      • Apply for Free Certificate
      • Using Managed SSL Certificate
    • Configure DNS CNAME Record
  • Observability
    • Overview
    • Metric Analysis
    • Log Analysis
  • Functions
    • Overview
    • Edge Functions
    • Cloud Functions
      • Overview
      • Node.js
      • Python
      • Go
  • Agents
    • Overview
    • Quick Start
    • Conversation Storage
    • Observability
    • Sandbox Tool
      • Overview
      • Using the Agent Framework
      • Sandbox Atomic API
      • Network Search Tool
    • Agent Authentication
  • Models
    • Overview
    • Models and Vendors
      • Overview
      • Using Vendor Keys
        • OpenAI
        • Anthropic
        • Google AI Studio
        • DeepSeek
        • MiniMax
        • Hunyuan
        • Zhipu
        • MoonShot AI
    • FAQs
  • Storage
    • Overview
    • KV
    • Blob
  • Middleware
  • AI-Native Development
    • Skills
    • MCP
  • Copilot
    • Overview
    • Quick Start
  • API Token
  • EdgeOne CLI
  • Message Notification
  • Integration Guide
    • AI
      • Dialogue Large Models Integration
      • Large Models for Images Integration
    • Database
      • Supabase Integration
      • Pages KV Integration
    • Ecommerce
      • Shopify Integration
      • WooCommerce Integration
    • Payment
      • Stripe Integration
      • Integrating Paddle
    • CMS
      • WordPress Integration
      • Contentful Integration
      • Sanity Integration
      • Payload Integration
    • Authentication
      • Supabase Integration
      • Clerk Integration
  • Best Practices
    • Adding an AI Chat Assistant to a Website
    • AI Dialogue Deployment: Deploy Project with One Sentence Using Skill
    • Using General Large Model to Quickly Build AI Application
    • Use the DeepSeek model to quickly build a conversational AI site
    • Building an Ecommerce Platform with Shopify
    • Building a SaaS Site Using Supabase and Stripe
    • Building a Company Brand Site Quickly
    • How to Quickly Build a Blog Site
  • Migration Guides
    • Migrating from Vercel to EdgeOne Pages
    • Migrating from Cloudflare Pages to EdgeOne Pages
    • Migrating from Netlify to EdgeOne Pages
  • Troubleshooting
  • FAQs
  • Limits
  • Pricing
  • Contact Us
  • Release Notes

Migrating from Netlify to EdgeOne Pages

This guide helps you smoothly migrate your Netlify project to EdgeOne Makers.

Preparations: Search Build Command and Publish Directory

Start by finding your Netlify project's build command and output directory:
1. Log in to the dashboard and find the project to migrate.
2. Enter Site configuration, select the Build and deploy option.
3. In the Build settings section, note the values of Build command and Publish directory.





Example:
npm run build
Publish directory: .next
This information will be used in project configuration.

2.Configuration Migration: Handle Redirects and Headers

If your project uses _redirects and _headers files or configures redirects and custom headers in the netlify.toml file, migrate these configurations to the edgeone.json file in EdgeOne Makers.
Before migration, we need to understand your existing Netlify configuration and convert it into a format that Makers can understand.
The following is a comparison example of both:
Netlify configuration in netlify.toml
[build]
command = "npm run build"
publish = "build"

[[redirects]]
from = "/articles"
to = "/blogs"
status = 301

[[headers]]
source = "/*"

[[headers.headers]]
key = "X-Frame-Options"
value = "DENY"

[[headers.headers]]
key = "Cache-Control"
value = "max-age=7200"

[[headers]]
source = "/assets/*"

[[headers.headers]]
key = "Cache-Control"
value = "max-age=31536000"
In this example, we can see the build command, publish directory, redirect rules and custom headers configuration.
In EdgeOne Makers, create an edgeone.json file to include these configurations:
{
"buildCommand": "npm run build",
"outputDirectory": "build",
"redirects": [
{
"source": "/articles",
"destination": "/blog",
"statusCode": 301
}
],
"headers": [
{
"source": "/*",
"headers": [
{
"key": "X-Frame-Options",
"value": "DENY"
},
{
"key": "Cache-Control",
"value": "max-age=7200"
}
]
},
{
"source": "/assets/*",
"headers": [
{
"key": "Cache-Control",
"value": "max-age=31536000"
}
]
}
]
}
For detailed configuration options, see edgeone.json document.

3.Function Migration: From Netlify to EdgeOne Makers

The two platforms have some differences in syntax and usage. The following section compares the two function types from Netlify and Makers:
Netlify Serverless Functions example:
export default async (request, context) => {
return new Response("Hello, world!")
}
Makers Cloud Functions example:
// ./cloud-functions/hello.js
export default function onRequest(context) {
return new Response("Hello world");
}
Netlify Edge Functions example:
export default (request, context) => new Response("Hello world");

export const config = { path: "/test" };
Makers Edge Functions example:
// ./edge-functions/test.js
export default function onRequest(context) {
return new Response("Hello world");
}
Main difference:
1. Function definition:
1.1 Netlify Serverless Functions export async handler by default; Edge Functions export handler by default (can be async) and require explicitly specifying the route path.
1.2 Makers uses named onRequest functions (such as onRequestGet, onRequestPost, and so on).
2. Parameters:
2.1 Netlify functions receive request and context as separate parameters.
2.2 Makers functions receive a context object.
3. Response method:
3.1 Both use the Response object to return responses, which is similar.
4. Runtime environment:
4.1 Netlify uses Node.js runtime and Deno runtime.
4.2 Node.js/Go/Python runtimes and Edge runtime are used in Makers.
Migration suggestions:
Change the default exported function to a named onRequest function
// Netlify
export default async (request, context) => {
// function body
};

// EdgeOne Makers
export default function onRequest(context) {
// function body
}
Adjust parameter usage
// Netlify
const { geo } = context;

// EdgeOne Makers
const { request } = context;
const geo = request.eo.geo;
Keep the usage of the Response object. This part basically does not need to change.
Check and adjust any Netlify function-specific API usage. Makers Functions may not support certain specific features. You need to find alternative solutions and can contact us through the community.
File naming may need to be adjusted. Netlify uses suffixes such as .js, .ts, or .edge.js, while Makers currently supports .js, .ts, .cjs, .jsx, and .tsx.
Note:
Makers Functions supports both Cloud Functions and Edge Functions. These two have some differences in features, such as the context object. You can choose between them based on your specific requirements.
For detailed function usage, refer to the Makers Functions documentation.

4.Project Deployment: Creating a New Project in EdgeOne Makers

After completing the preparations, create and deploy the project on Makers:
1. Log in to the Tencent Cloud console and go to the Makers service.
2. Click "Create project" and select your GitHub repository.
3. In project settings, fill in the build command and publish directory recorded earlier.
4. Click the "Start Deployment" button, and Makers will automatically build and deploy your project.

5.Domain Configuration: Adding a Custom Domain

Netlify and Makers have some differences in domain configuration:
1. Add a domain in Makers:
1.1 In the console, add the same custom domain to your project.
2. Update DNS records:
2.1 If you use Netlify DNS, transfer the domain to another DNS provider.
2.2 If using external DNS, update existing records:
2.2.1 Change A records or ALIAS records to CNAME records.
2.2.2 Point the CNAME record to the domain name provided by Makers.
3. Verify DNS setting:
3.1 Use dig or online DNS query tools to confirm that DNS changes have taken effect.
4. Wait for HTTPS certificate configuration:
4.1 Makers will automatically configure an HTTPS certificate for your domain.
For the detailed domain addition process, see the domain name management document.
By completing the steps above, you have successfully migrated your Netlify project to EdgeOne Makers. The two platforms share similarities in some aspects. However, leveraging our robust infrastructure, we have implemented optimizations such as intelligent refresh and pre-warming tailored to Makers' product features, delivering an out-of-the-box user experience. Furthermore, during the public beta phase, Makers imposes fewer restrictions compared to competitors, offering developers greater flexibility and more choices. In terms of customer support, we provide more responsive assistance and are committed to creating a superior product experience for developers.
If you encounter any issues during the migration, refer to the EdgeOne Makers official documentation.

ai-agent
You can ask me like
What types of applications can I deploy?