Project Launcher

Custom Domains

Connect domains to funnels or the redirect system

Cloudflare SSL β€” important

When adding a domain (first time):

Set Cloudflare record to DNS Only ☁️ (grey cloud) β€” required for Vercel to verify and issue SSL.

After verified βœ… (optional):

You can enable the orange cloud proxy, but you MUST set Cloudflare SSL/TLS mode to Full (Strict) β€” otherwise Chrome shows "Not Secure".

TypeNameValueProxy
CNAME@ or subdomaincname.vercel-dns.com☁️ OFF first

Funnel Mode

One domain can serve multiple funnels on different paths:
store.com/ β†’ Funnel A
store.com/hair β†’ Funnel B
store.com/skin β†’ Funnel C

Redirect Mode

ads.store.com/promo β†’ looks up promo in Smart Redirects β†’ destination
All URL params forwarded automatically.

Loading…
Database migration (run once in Supabase SQL editor)
-- Add mode, label, path_prefix columns; make funnel_id nullable
ALTER TABLE funnel_domains
  ADD COLUMN IF NOT EXISTS mode TEXT DEFAULT 'funnel'
    CHECK (mode IN ('funnel', 'redirect'));

ALTER TABLE funnel_domains
  ADD COLUMN IF NOT EXISTS label TEXT;

ALTER TABLE funnel_domains
  ADD COLUMN IF NOT EXISTS path_prefix TEXT DEFAULT '/';

ALTER TABLE funnel_domains
  ALTER COLUMN funnel_id DROP NOT NULL;

-- Redirects table (if not already created)
CREATE TABLE IF NOT EXISTS redirects (
  id          UUID PRIMARY KEY DEFAULT gen_random_uuid(),
  slug        TEXT UNIQUE NOT NULL,
  destination TEXT NOT NULL,
  label       TEXT,
  clicks      INTEGER DEFAULT 0,
  created_at  TIMESTAMPTZ DEFAULT now(),
  updated_at  TIMESTAMPTZ DEFAULT now()
);

CREATE OR REPLACE FUNCTION increment_redirect_clicks(redirect_id UUID)
RETURNS void LANGUAGE SQL SECURITY DEFINER AS $$
  UPDATE redirects SET clicks = clicks + 1, updated_at = NOW()
  WHERE id = redirect_id;
$$;