Facebook Pixel

What is the complete process for setting up a custom domain?

Buy a domain, allocate an Elastic IP, configure DNS records (A and CNAME), set up Nginx server blocks for each subdomain, add SSL with Let's Encrypt, update backend CORS and cookies, update frontend env vars, verify everything works, and set up monitoring and auto-renewal.

Verify This Answer

Cross-check this information using these trusted sources:

More FAQs in Custom Domain Setup Summary and Checklist Complete Guide for Node.js Deployment

A record for @ (root domain) pointing to EC2 IP, A record for api subdomain pointing to EC2 IP, A record for app subdomain pointing to EC2 IP (or CNAME to Vercel), and CNAME for www pointing to yourdomain.com.

Backend: CLIENT_URL=https://app.yourdomain.com. Frontend: VITE_API_URL=https://api.yourdomain.com/api and VITE_SOCKET_URL=https://api.yourdomain.com. Also update CORS origins and cookie settings (secure: true, sameSite: none, domain: .yourdomain.com).

Check DNS (dig yourdomain.com A +short), HTTP to HTTPS redirect (curl -I http), HTTPS (curl -I https), API (curl https://api.yourdomain.com/api/health), frontend loads in browser, login works, cookies persist on refresh, WebSocket chat works, and SSL grade at ssllabs.com.

Still have questions?

Browse all our FAQs or reach out to our support team

Want to upskill yourself?

Our courses are taking a Coffee break, but your curiosity shouldn't. Stay engaged with namastedev linkedin, youtube, discord and other resources while you wait.

0
Please Login.
Please Login.
Please Login.
Please Login.
Please Login.
Please Login.
Please Login.
Please Login.
Please Login.
Please Login.
Please Login.
Please Login.