Session Three
Custom Domains & Lead Magnets
By the end of this session, you will have a custom domain pointing to your site, a live lead capture page, a real database storing your subscribers, and an automated email delivering your resource the moment someone signs up.
Workshop Recording
Follow along with the live session. Hit play and the video will stick to the top as you scroll.
Custom Domain Setup
Buy a domain, connect it to Vercel, and configure DNS so your site lives at your own address. Covers all major registrars with exact DNS values included.
Open Custom Domain guideBuild Your Lead Magnet Page
A lead magnet is a free resource you give people in exchange for their email. We will build a page where someone enters their name and email and automatically receives your resource. All of this happens without you doing anything.
Open your terminal and start Claude Code
First, open your terminal:
Mac
- Shortcut: Press
Cmd + Space, type Terminal, press Enter - Through Finder: Applications → Utilities → Terminal
Windows
- Shortcut: Press the
Windows key, type Command Prompt, press Enter - Through Start: Start → All Apps → Windows Tools → Command Prompt
Navigate to your project folder, then run:
claude --dangerously-skip-permissionsHeads Up
Pro Tip
--dangerously-skip-permissions flag lets Claude run commands without asking for approval each time. Much faster for workshops. Only use it in your own project folder.Tell Claude to build your lead magnet page
Edit the prompt below directly — replace the text in brackets with your own details. When you are done, hit Copy and paste it into Claude Code.
Pro Tip
Set Up Supabase
Supabase is a free tool that stores your subscriber data. When someone fills out your form, their name and email get saved here automatically. You can log in any time and see your whole list.
Create your Supabase project
- Go to supabase.com/dashboard and click New Project
- Give it a name like your business name or “my-leads”
- Set a password and save it somewhere
- Pick the region closest to you
- Click “Create new project” and wait about one minute
Get your Supabase Personal Access Token
When Claude sets up your database tables and security rules, it often uses the Supabase CLI behind the scenes to run SQL. The CLI needs a Personal Access Token — a separate account-level key that lets Claude authenticate and execute commands against your project.
- Go to supabase.com/dashboard/account/tokens (or click your avatar at the top right → Account → Access Tokens)
- Click Generate new token
- Name it something like “claude-workshop”
- Copy the token immediately — you cannot view it again after closing the modal
- Go to Claude Code and paste this:
Heads Up
Create your API keys and give them to Claude
- In your Supabase project, click the gear icon and go to Settings > API Keys
- Click Create new API Keys
- Copy your Project URL (looks like https://abcdef.supabase.co)
- Copy the Publishable key (starts with
sb_publishable_) - Copy the Secret key (labeled Service Role or Secret — you will need this in the next step)
- Go to Claude Code in your terminal and paste this with your values filled in:
Heads Up
Note
Lock down your subscriber table with Row Level Security
By default, anyone who finds your Supabase URL can read or delete your entire subscriber list. Row Level Security fixes that — the website can only add new subscribers, and nothing else is exposed. Your server needs one extra key to keep duplicate checking working.
Enable Row Level Security on my Supabase subscribers table.
Allow anyone to submit a new row through the form, but block all reading, editing, and deleting from the public. Use my service role key server-side so duplicate checking still works. Add the service role key to my .env.local and to my Vercel environment variables.
Show me confirmation that RLS is on and the policy is active.Heads Up
.env.local and your Vercel environment variables — never in any code that runs in the browser.Get your Resend key and give it to Claude
- Go to resend.com and sign in (create a free account if you have not yet)
- Click API Keys in the left sidebar
- Click Create API Key, give it a name like “lead-magnet”, and click Create
- Copy the key immediately, then go back to Claude Code and paste this:
Heads Up
Tell Claude to set up the form backend and subscriber database
Now that Claude has your Supabase credentials, tell it to set up everything your lead magnet form needs to work on the server side:
Set up the backend for my lead magnet form using my Supabase credentials.
1. Create a database table to store my email subscribers. It should save their first name, email, which lead magnet they signed up for, and the date.
2. The same person should be able to sign up for different lead magnets and get each email.
3. The same person should not be able to sign up for the same lead magnet twice.
4. Make sure my website is allowed to save data to the table.
5. Set up the server side so that when someone submits their name and email through the lead magnet form, it saves them to the database.
6. Make sure both fields are filled in before saving anything.
7. Return a success message when it works and an error message when it does not.Note
Wire It All Together
Claude has all your credentials. Now give it one command to connect everything, then two more to push it live.
Tell Claude to set up the full integration
Tell Claude to add your keys to Vercel
Claude can add your environment variables to Vercel directly:
Add my Supabase and Resend environment variables to my Vercel project.Tell Claude to deploy
Deploy my website to production.- Once deployed, visit your live site on your custom domain
- Submit the form with a real email address
- Confirm: a new row appears in the Supabase Table Editor and an email lands in your inbox
You just built something real.
You have a custom domain, a live lead capture page, a real database, and automated email delivery. This is the foundation of every serious online business.
Support Each Other
Post in the Masterminds group
Share your lead magnet link in the group and ask people to sign up and open your email. Every open counts toward your open rate, and a healthy open rate makes your list more valuable to every platform you ever send from.
Join each other's email lists
Find every lead magnet link posted in the group and sign up for all of them. Your subscriber count goes up, theirs does too.
Reply to the welcome emails you receive
Even a short reply like “got it, looks great!” tells email providers this is a real conversation. It boosts the sender's deliverability for everyone they email from now on.
Important: Resend Free Tier
Your lead magnet works, with two limits
Until you verify your own domain in Resend, two things apply:
Emails send from a default address (onboarding@resend.dev), not from your own domain. They may land in spam.
You can only send to your own email address (the one you signed up with). Other recipients will not receive the email until you verify a domain.
This is fine for today. You can test the full flow by submitting your own email. To unlock sending to anyone, complete the optional homework below.
Optional Homework: Verify Your Domain in ResendChallenge
Customize your welcome email with your own branding and tone, then get at least 5 signups from real people before the next session.
Send Emails from
Your Own Domain
Free on all Resend plans, including the free tier. No extra cost.
Right now your emails come from onboarding@resend.dev. With a few extra DNS records you can send from your own address like hello@yourdomain.com. This looks far more professional and improves your deliverability. About 10 minutes and completely free.
Step 1 — Add your domain to Resend
Go to Resend > Domains and click Add Domain. Enter your domain name and click Add.
Step 2 — Add the DNS records Resend gives you
Resend will show you 3 to 4 DNS records (similar to what you did for Vercel). Go back to your registrar and add each one. These prove to email providers you own the domain.
Step 3 — Tell Claude to update your from address
Once Resend shows a green Verified badge, go to Claude Code and paste this:
Step 4 — Tell Claude Code to deploy
Once Claude has updated the code, tell it:
Deploy my website to production.Using Codex instead of Claude Code? Codex version of this page