Migrate from Netlify
This guide helps you migrate your site from Netlify to Quant. We’ll cover build configuration, redirects, forms, environment variables, and DNS changes.
Migration overview
Section titled “Migration overview”| Netlify Feature | Quant Equivalent |
|---|---|
| Continuous deployment | GitHub Actions |
| Build settings | GitHub Actions workflow |
Redirects (_redirects) | Page Rules or CLI |
| Environment variables | GitHub Secrets + workflow |
| Forms | Quant Forms |
| Functions | Edge Functions |
| Split testing | Multiple projects + DNS |
| Analytics | Third-party or edge functions |
Step 1: Create a Quant project
Section titled “Step 1: Create a Quant project”- Sign up at dashboard.quantcdn.io
- Create a new Static project
- Note your organisation ID and project name
- Copy your project token from Integrations
Step 2: Set up GitHub Actions
Section titled “Step 2: Set up GitHub Actions”Replace Netlify’s build integration with a GitHub Actions workflow.
Create .github/workflows/deploy.yml:
name: Deploy to Quant
on: push: branches: [main] # Match your production branch
jobs: deploy: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4
- uses: actions/setup-node@v4 with: node-version: '20' cache: 'npm'
- name: Install dependencies run: npm ci
- name: Build run: npm run build env: # Add your build-time environment variables here NODE_ENV: production
- name: Deploy to Quant uses: quantcdn/deploy-action@v6 with: customer: ${{ secrets.QUANT_CUSTOMER }} project: ${{ secrets.QUANT_PROJECT }} token: ${{ secrets.QUANT_TOKEN }} dir: dist # Adjust to your build output directory skip-purge: true
- name: Purge cache uses: quantcdn/purge-action@v6 with: customer: ${{ secrets.QUANT_CUSTOMER }} project: ${{ secrets.QUANT_PROJECT }} token: ${{ secrets.QUANT_TOKEN }} url_pattern: "/*"Add these secrets to your GitHub repository (Settings → Secrets):
QUANT_CUSTOMER— Your organisation IDQUANT_PROJECT— Your project nameQUANT_TOKEN— Your project token
Step 3: Migrate environment variables
Section titled “Step 3: Migrate environment variables”Build-time variables
Section titled “Build-time variables”Netlify environment variables set in the dashboard become GitHub Secrets or workflow environment variables:
Netlify dashboard → GitHub Secrets (for sensitive values):
- name: Build run: npm run build env: API_KEY: ${{ secrets.API_KEY }}netlify.toml → Workflow environment (for non-sensitive values):
- name: Build run: npm run build env: SITE_URL: https://www.example.com API_ENDPOINT: https://api.example.comRuntime variables
Section titled “Runtime variables”If you use Netlify Functions with runtime environment variables, migrate these to Quant Cloud or edge functions. See Edge Functions for configuration.
Step 4: Migrate redirects
Section titled “Step 4: Migrate redirects”Simple redirects
Section titled “Simple redirects”Convert your _redirects file to Quant Page Rules or deploy via CLI.
Netlify _redirects:
/old-page /new-page 301/blog/* /articles/:splat 302Option 1: Page Rules (recommended for complex rules)
In the dashboard, go to Page Rules and create rules:
| URL Match | Action | Redirect To | Status |
|---|---|---|---|
/old-page | Redirect | /new-page | 301 |
/blog/* | Redirect | /articles/$1 | 302 |
Option 2: CLI (for simple redirects)
Create redirects programmatically:
quant redirect /old-page /new-page 301quant redirect /blog/* /articles/$1 302Redirect syntax comparison
Section titled “Redirect syntax comparison”| Netlify | Quant Page Rules |
|---|---|
:splat | $* (entire path) or $1, $2 (captures) |
:placeholder | * with $1, $2 captures |
200! (rewrite) | Proxy action |
404 | Custom response action |
Headers and rewrites
Section titled “Headers and rewrites”Netlify _headers file functionality maps to Quant’s custom headers:
Dashboard: Go to Custom HTTP Headers to set global headers.
Page Rules: Use the “Custom response headers” action for path-specific headers.
Step 5: Migrate forms
Section titled “Step 5: Migrate forms”Create Quant Forms
Section titled “Create Quant Forms”- Go to Forms in the dashboard
- Click New Form
- Enter the form action URL (e.g.,
/contact)
Update your HTML
Section titled “Update your HTML”Quant Forms work with your existing HTML forms. Remove Netlify-specific attributes:
Before (Netlify):
<form name="contact" method="POST" data-netlify="true" netlify-honeypot="bot-field"> <input type="hidden" name="form-name" value="contact"> <input name="bot-field" style="display:none"> ...</form>After (Quant):
<form action="/contact" method="POST"> <input type="hidden" name="honeypot" style="display:none"> ...</form>Configure the honeypot field in the Quant dashboard under your form settings.
Form notifications
Section titled “Form notifications”Set up email and Slack notifications in the form configuration. See Using Quant Forms.
Step 6: Migrate functions
Section titled “Step 6: Migrate functions”Edge Functions
Section titled “Edge Functions”Netlify Edge Functions can often be migrated to Quant Edge Functions:
Netlify Edge Function:
export default async (request, context) => { const country = context.geo.country; // ...};Quant Edge Function:
export default { async fetch(event) { const country = event.request.cf?.country; // ... }};Key differences:
- Quant uses the
fetchevent pattern - Geolocation is available via
event.request.cfor headers - Deploy via CLI:
quant function ./my-function.js "Description"
Serverless Functions
Section titled “Serverless Functions”Netlify serverless functions (Node.js backend) should migrate to Quant Cloud for full Node.js runtime support.
Step 7: Update DNS
Section titled “Step 7: Update DNS”Before switching
Section titled “Before switching”- Test your site on the Quant preview domain
- Verify all pages, forms, and redirects work correctly
- Check SSL certificate is ready (auto-provisioned)
DNS changes
Section titled “DNS changes”In the Quant dashboard, go to Domains and add your custom domain. You’ll see DNS instructions:
For apex domains (example.com):
A record: @ → [Quant IP addresses]For subdomains (www.example.com):
CNAME: www → [your-project].quantcdn.ioRecommended: Use Quant DNS
Section titled “Recommended: Use Quant DNS”For the best performance and features, consider using Quant DNS:
- Create a DNS zone in DNS Management
- Import your existing records
- Update nameservers at your registrar
Step 8: Verify and clean up
Section titled “Step 8: Verify and clean up”After DNS propagates (usually 1-24 hours):
- Test thoroughly — Check all pages, forms, and functions
- Monitor — Watch for 404s or errors in your logs
- Remove Netlify — Once confirmed working, delete your Netlify site
Feature comparison
Section titled “Feature comparison”| Feature | Netlify | Quant |
|---|---|---|
| Global CDN | ✅ | ✅ 600+ locations |
| Automatic HTTPS | ✅ | ✅ |
| Branch deploys | ✅ | ✅ Via workflow |
| Deploy previews | ✅ | Preview domains |
| Forms | ✅ | ✅ |
| Edge Functions | ✅ | ✅ |
| Serverless Functions | ✅ | Quant Cloud |
| Split testing | ✅ | Page Rules |
| Analytics | ✅ | Third-party |
| WAF | Add-on | ✅ Included |
| DDoS protection | ✅ | ✅ |
Common issues
Section titled “Common issues”Build fails in GitHub Actions
Section titled “Build fails in GitHub Actions”- Check Node.js version matches your local environment
- Ensure all dependencies are in
package.json - Verify build command matches your
netlify.toml
Redirects not working
Section titled “Redirects not working”- Page Rules are evaluated in order — check priority
- Wildcards use
*in Quant, not:splat - Verify redirect status codes (301 vs 302)
Forms not submitting
Section titled “Forms not submitting”- Ensure form action URL matches the configured form path
- Check honeypot field configuration
- Verify form is enabled in the dashboard
Next steps
Section titled “Next steps”- Configure WAF — Enable security features
- Set up monitoring — Use crawler for automated checks
- Optimise performance — Configure caching headers