DNS Migration Guide: Terraphim.ai from Netlify to Cloudflare
Current DNS Configuration
Netlify Setup
- Domain: terraphim.ai
- Nameservers: Netlify's nameservers
- A Records: Point to Netlify's load balancers
- CNAME: www.terraphim.ai β Netlify
- SSL: Managed by Netlify
Target DNS Configuration
Cloudflare Pages Setup
- Domain: terraphim.ai
- Nameservers: Cloudflare's nameservers
- A Records: Point to Cloudflare Pages
- CNAME: www.terraphim.ai β Cloudflare Pages
- SSL: Managed by Cloudflare
Migration Steps
Phase 1: Preparation
1.1 Current DNS Analysis
# Check current nameservers
# Check current A records
# Check current CNAME
# Check SSL certificate
1.2 Document Current Records
Create a backup of current DNS settings:
| Record Type | Name | Value | TTL | |-------------|------|-------|-----| | A | @ | Netlify IP | 300 | | CNAME | www | netlify.app | 300 | | MX | @ | mail.terraphim.ai | 300 | | TXT | @ | Various verification | 300 |
Phase 2: Cloudflare Setup
2.1 Add Domain to Cloudflare
- Log in to Cloudflare Dashboard
- Add domain:
terraphim.ai - Choose plan (Free is sufficient)
- Scan existing DNS records
- Update nameservers to Cloudflare
2.2 Cloudflare Nameservers
After adding domain to Cloudflare, you'll get nameservers like:
dina.ns.cloudflare.comjim.ns.cloudflare.com
2.3 DNS Record Configuration
Once nameservers are updated, configure these records:
# A Records (for root domain)
A @ 192.0.2.1 # Cloudflare Pages IP
A @ 192.0.2.2 # Cloudflare Pages IP
A @ 192.0.2.3 # Cloudflare Pages IP
# CNAME Records
CNAME www terraphim-ai.pages.dev
# MX Records (if email is used)
MX @ 10 mail.terraphim.ai
# TXT Records
TXT @ "v=spf1 include:_spf.google.com ~all"
TXT @ "google-site-verification=..."Phase 3: Cloudflare Pages Configuration
3.1 Custom Domain Setup
- Go to Cloudflare Pages > terraphim-ai
- Click "Custom domains"
- Add
terraphim.ai - Add
www.terraphim.ai - Wait for DNS verification
3.2 SSL Certificate
- Cloudflare automatically provisions SSL certificate
- Usually takes 5-10 minutes
- Certificate is valid for 1 year and auto-renews
Phase 4: Migration Execution
4.1 Pre-Migration Checklist
- [ ] Backup current DNS records
- [ ] Verify Cloudflare account access
- [ ] Test Cloudflare Pages deployment
- [ ] Prepare rollback plan
- [ ] Schedule maintenance window
4.2 Migration Timeline
T-2 hours: Final verification of all configurations
T-1 hour: Notify users of scheduled maintenance
T-0: Update nameservers to Cloudflare
T+5 min: Verify nameserver propagation
T+15 min: Check DNS resolution
T+30 min: Verify SSL certificate
T+1 hour: Test website functionality
T+2 hours: Monitor performance and analytics
T+24 hours: Delete Netlify project (if stable)4.3 Migration Commands
# Monitor nameserver propagation
# Check A record resolution
# Test website accessibility
# Check SSL certificate
Phase 5: Post-Migration
5.1 Verification Tests
# Test all pages
|
# Test static assets
# Test navigation
|
# Test forms (if any)
5.2 Performance Monitoring
- Cloudflare Analytics
- Google PageSpeed Insights
- GTmetrix performance tests
- Uptime monitoring
5.3 SEO Considerations
- Verify all URLs are the same
- Check Google Search Console
- Monitor for 404 errors
- Verify sitemap accessibility
Rollback Plan
Immediate Rollback (if issues within 24 hours)
- Revert nameservers to Netlify
- Restore original DNS records
- Verify website is accessible
- Investigate Cloudflare issues
Rollback Commands
# Revert nameservers (via domain registrar)
# Update back to Netlify nameservers
# Verify rollback
Troubleshooting
Common Issues
DNS Propagation Delays
- Issue: Nameserver changes taking too long
- Solution: Wait up to 48 hours for full propagation
- Check: Use multiple DNS lookup tools
SSL Certificate Issues
- Issue: Certificate not provisioning
- Solution: Check DNS records, ensure CNAME is correct
- Force: Re-issue certificate in Cloudflare dashboard
Website Not Loading
- Issue: 404 errors or connection refused
- Solution: Verify Cloudflare Pages deployment
- Check: Build logs and deployment status
Performance Issues
- Issue: Slow load times
- Solution: Check Cloudflare caching rules
- Optimize: Enable Cloudflare features (Brotli, HTTP/2)
Monitoring Commands
# Continuous monitoring
while ; do
done
# DNS propagation check
for; do
Success Metrics
Technical Metrics
- DNS Propagation: <2 hours
- SSL Provisioning: <15 minutes
- Website Availability: 99.9%+
- Load Time: <2 seconds globally
Business Metrics
- Zero Downtime: During migration
- SEO Stability: No ranking changes
- User Experience: No reported issues
- Performance Improvement: 20%+ faster load times
Maintenance
Ongoing Tasks
- Monitor SSL certificate renewal
- Update DNS records as needed
- Optimize Cloudflare caching rules
- Regular performance audits
Security Considerations
- Enable Cloudflare security features
- Monitor for DDoS attacks
- Keep DNS records updated
- Regular security audits
This DNS migration guide ensures a smooth transition from Netlify to Cloudflare Pages while maintaining website availability and performance.