React App Custom Domain: Deployment Guide
Deploying a React application is the final step in bringing your project to users. While hosting platforms provide default URLs, a custom domain like app.is-pro.dev gives your React app a professional identity. This guide covers deploying React apps built with Vite or Create React App to various platforms and connecting them to your free is-pro.dev subdomain.
Why Use a Custom Domain for Your React App?
A custom domain does more than look professional — it improves SEO rankings, builds user trust, and provides a consistent URL for sharing. When you use a free is-pro.dev subdomain, you get all these benefits without any recurring cost. Your React app will be served over HTTPS with Cloudflare's global CDN.
Prerequisites
- A React application (Vite or Create React App)
- A GitHub repository with your source code
- An account on your preferred hosting platform (Vercel, Netlify, or Cloudflare Pages)
- A registered is-pro.dev subdomain
- Vite: Build command npm run build
, output directorydist - Create React App: Build command npm run build
, output directorybuild - Vercel: cname.vercel-dns.com
- Netlify: your-site.netlify.app
- Cloudflare Pages: your-project.pages.dev
Step 1: Build Your React Application
Before deploying, create a production build of your React app:
``bash
For Vite projects
npm run build
For Create React App
npm run build
`
This generates a dist or build folder containing optimized static files. Ensure your application uses relative paths or environment variables for API endpoints so it works correctly with your custom domain.
Step 2: Choose a Hosting Platform
Vercel is ideal for Next.js and Vite projects. It offers automatic deployment from GitHub and handles server-side rendering if you upgrade to Next.js later. Connect your GitHub repository and Vercel will automatically detect your build settings.
Netlify excels at static sites and offers powerful form handling, serverless functions, and deploy previews. It supports both Vite and Create React App with zero-configuration setup.
Cloudflare Pages provides unlimited bandwidth and integrates with Cloudflare's global network. If you are already using is-pro.dev (which runs on Cloudflare), this is a seamless choice.
Step 3: Deploy Your React App
Push your code to a GitHub repository. Connect your hosting platform to GitHub and select the repository. The platform will detect your framework and configure the build command automatically:
After deployment, your app will be available at a platform-assigned URL.
Step 4: Point Your Subdomain
Register a subdomain at dash.is-pro.dev if you have not already. Then add a CNAME record pointing your subdomain to your hosting platform's domain:
Step 5: Configure the Custom Domain on Your Platform
Go to your platform's settings and add your is-pro.dev subdomain as a custom domain. Each platform will verify the DNS configuration automatically. Once verified, enable HTTPS — all three platforms provide free SSL certificates.
Single Page Application Routing
React SPAs handle routing client-side with React Router. To prevent 404 errors on direct URL access, configure redirect rules on your hosting platform:
`
Netlify (_redirects)
/* /index.html 200
Vercel (vercel.json)
{ "rewrites": [{ "source": "/(.*)", "destination": "/index.html" }] }
Cloudflare Pages
Create a _redirects file with: /* /index.html 200
`
Troubleshooting
Blank page after deployment: Check that your React app builds without errors and that the publicPath or base URL is configured correctly. For Vite, set base: '/' in vite.config.js`.
Assets not loading: If CSS, JS, or images return 404, ensure your build output directory is correctly specified in the hosting platform settings.
API calls failing: CORS issues may arise if your API is on a different domain. Configure CORS headers on your API server or use a proxy during development.
FAQ
Q: Can I use environment variables with a custom domain?
A: Yes, environment variables are configured in your hosting platform's dashboard and are independent of your domain setup.
Q: Will React Router work with my custom domain?
A: Yes, but you need the redirect rule mentioned above to handle client-side routing correctly.
Q: Can I deploy updates without downtime?
A: Yes, all three platforms support zero-downtime deployments. Push to your repository and the platform handles the rest.
Conclusion
Deploying your React app with a custom is-pro.dev subdomain is straightforward. Build your app, push it to GitHub, connect to a hosting platform, and configure your domain. Your React application will be live with a professional URL, automatic HTTPS, and global CDN — all for free.