How to Connect a Custom Subdomain to Render Using Cloudflare
Render gives every site a free address ending in onrender.com, but a custom subdomain such as blog.yourdomain.com looks far more professional. If your domain's DNS is managed by Cloudflare, the setup takes about ten minutes.
Step 1: Add the custom domain in Render
Open your service in the Render dashboard, go to Settings, find Custom Domains and click Add Custom Domain. Enter the full subdomain, for example blog.yourdomain.com. Render then shows the address your DNS record must point to, which looks like yourservice.onrender.com.
Step 2: Create the CNAME record in Cloudflare
In Cloudflare, open your domain, go to DNS, then Records, and click Add record. Use these values:
- Type: CNAME
- Name: blog
- Target: yourservice.onrender.com
- Proxy status: DNS only (grey cloud)
Step 3: Verify and wait for HTTPS
Return to Render and click Verify next to the domain. Once it verifies, Render issues an HTTPS certificate automatically. This usually takes a few minutes, but DNS changes can sometimes take a few hours to spread.
Common problems
- Verification fails: check that no older A, AAAA or CNAME record exists with the same name. Conflicting records are the most common cause.
- Typo in the target: copy the onrender.com address exactly as Render shows it.
- Proxy turned on too early: keep the cloud grey until Render has verified the domain. After that you can turn the proxy on and set the SSL/TLS mode to Full if you want Cloudflare's extra features.
When https://blog.yourdomain.com loads your site with a padlock, you are done.