๐ Custom Subdomain Forwarding with Cloudflare


๐ฏ What We're Building
Subdomain | Forwards To |
iam.nikhilmishra.live | bento.me/kaalpanikh |
links.nikhilmishra.live | linktr.ee/kaalpanikh |
๐ How It Works
%%{init: {"theme": "default"}}%%
graph LR
A[User] -->|Visits| B[iam.nikhilmishra.live]
A -->|Visits| C[links.nikhilmishra.live]
subgraph Cloudflare
B -->|DNS Record| D[CNAME to @]
C -->|DNS Record| E[CNAME to @]
D -->|Page Rule| F[301 Redirect]
E -->|Page Rule| G[301 Redirect]
end
F -->|Forwards to| H[bento.me/kaalpanikh]
G -->|Forwards to| I[linktr.ee/kaalpanikh]
style Cloudflare fill:#F6821F,stroke:#F6821F,stroke-width:2px
style H fill:#5D45F9,stroke:#5D45F9,stroke-width:2px
style I fill:#39E09B,stroke:#39E09B,stroke-width:2px
Note: This setup uses Cloudflare as a workaround since free Bento and Linktree plans don't support custom domains.
๐ Step-by-Step Guide
1๏ธโฃ Create DNS Records
Log in to your Cloudflare Dashboard
Select your domain:
nikhilmishra.live
Go to DNS โ Records
Add the following records:
For Bento Profile
Type: CNAME
Name: iam
Target: @
Proxy: โ
Enabled (Orange Cloud)
For Linktree Profile
Type: CNAME
Name: links
Target: @
Proxy: โ
Enabled (Orange Cloud)
2๏ธโฃ Set Up Page Rules
Navigate to Rules โ Page Rules
Create two page rules:
Bento Redirect
URL Pattern: https://iam.nikhilmishra.live/*
Forward to: https://bento.me/kaalpanikh
Status: 301 (Permanent Redirect)
Linktree Redirect
URL Pattern: https://links.nikhilmishra.live/*
Forward to: https://linktr.ee/kaalpanikh
Status: 301 (Permanent Redirect)
3๏ธโฃ Verify Setup
After DNS propagation (usually 5-10 minutes):
Visit iam.nikhilmishra.live
- Should redirect to your Bento profile.
Visit links.nikhilmishra.live
- Should redirect to your Linktree profile.
โ ๏ธ Troubleshooting
If redirects aren't working:
Check if Cloudflare proxy is enabled (orange cloud).
Verify page rules are in the correct order.
Clear your browser cache.
Wait a few more minutes for DNS propagation.
๐ Useful Links
Subscribe to my newsletter
Read articles from Nikhil Mishra directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by

Nikhil Mishra
Nikhil Mishra
I am a student studying in Mumbai University, learning DevOps, looking for opportunities to learn more things by gaining experience at prestigious institutions