To connect your Netlify any site to your custom domain or subdomain https://blogs.janakkumarshrestha0.com.np
using Cloudflare, follow this step-by-step guide:
β Step-by-Step: Connect Custom Domain via Cloudflare
π Prerequisites:
- Your site is already deployed and live on Netlify
- You own/manage the
.com.np
domain via Cloudflare
π§ STEP 1: Add Domain to Netlify
- Go to your site on Netlify
- Navigate to:
Site settings β Domain Management β Add a domain
- Click Add a domain you already ownβ
- Enter your sub domain:
blogs.janakkumarshrestha0.com.np
- Click Verify, then Add domain
π STEP 2: Point DNS from Cloudflare to Netlify
-
Go to your domain in Cloudflare Dashboard
-
Go to the DNS tab
-
Add a new CNAME record:
Type Name Target TTL Proxy CNAME blog your-site.netlify.app
Auto β ON - Replace
your-site.netlify.app
with your actual Netlify subdomain (found on your Netlify dashboard). Name
isblog
, not the full domain.
- Replace
π STEP 3: Verify Domain Ownership with Netlify via Cloudflare
Netlify needs to verify that you own the domain example.com.np
before it allows you to add a subdomain like sub.example.com.np
.
sub.example.com.np is an alias of examples.netlify.app and has its traffic proxied through Cloudflare.
To verify ownership using Cloudflare DNS, follow these steps:
Copy TXT Record from Netlify
From Netlify:
- Host:
netlify-challenge
- Value:
your-value
Add TXT Record in Cloudflare
-
Go to Cloudflare Dashboard
-
Select your domain:
yourdomain.com.np
-
Go to the DNS tab
-
Click βAdd recordβ
-
Choose:
- Type:
TXT
- Name (Host):
netlify-challenge
- Content (Value):
your-value
- TTL: Auto
- Type:
-
Click Save
π STEP 4: Ensure SSL (HTTPS) Works
-
On Netlify:
- Go to Site settings β Domain Management β HTTPS
- Enable Automatic HTTPS (Letβs Encrypt) if not already
-
On Cloudflare:
- Go to SSL/TLS β Overview
- Set SSL mode to Full or Full (Strict)
π STEP 5: Test Your Domain
-
Open a browser and go to:
https://blog.janakkumarshrestha0.com.np/
-
It should load your Netlify blog.
β Done!
Your blog is now live at your custom domain using Netlify + Cloudflare DNS.