Skip to main contentWebsite: https://pages.cloudflare.com/
Getting Cloudflare API Token & Account ID
- Sign Up/Sign In: Go to Cloudflare and create an account
- Navigate to API Tokens: Go to Profile → API Tokens → Create Token
- Create Pages Token: Use “Edit Cloudflare Pages” template or create custom token with:
- Account: Cloudflare Pages:Edit
- Zone: Page Rules:Edit (optional)
- Copy Token: Save the token securely
- Get Account ID: Go to Account Home → Account ID (copy this too)
Configuration in CodinIT
- Open Settings: Click the gear icon → Connections tab
- Find Cloudflare: Scroll to the Cloudflare connection section
- Enter Credentials:
- Paste your API token
- Paste your Account ID
- Verify: You should see your Cloudflare account information
Deploying Your Project
- Click Deploy: In any project, click the deploy button in the header
- Choose Cloudflare: Select “Deploy to Cloudflare” from the deployment dialog
- Wait for Deployment: CodinIT automatically builds and deploys your project
- View Live Site: Click the deployment URL when complete
Build Configuration
CodinIT automatically detects your build output. Cloudflare Pages will:
- Serve static files from your build directory
- Handle routing automatically for SPAs
- Enable edge computing for optimal performance
Environment Variables
Set environment variables in your Cloudflare Pages dashboard:
- Go to Pages → Your Project → Settings → Environment variables
- Add variables needed for your application
- They will be available during build and runtime
Custom Domains
Connect custom domains through Cloudflare Pages:
- Go to Pages → Your Project → Custom domains
- Add your domain and follow DNS setup instructions
- SSL certificates are provisioned automatically
Troubleshooting
Build Fails:
- Check the terminal output for build errors
- Ensure your build command works locally
- Verify all dependencies are listed in
package.json
Deployment Fails:
- Confirm your API token has Pages:Edit permissions
- Verify your Account ID is correct
- Check that your project builds successfully locally
Domain Issues:
- Ensure DNS records point to Cloudflare
- Wait for SSL certificate provisioning (can take a few minutes)
- Check Pages domain settings if using custom domain
Performance:
- Cloudflare Pages automatically optimizes assets
- Enable “Always Use HTTPS” in domain settings
- Consider using Cloudflare’s image optimization