Skip to main content
Customize the transactional auth emails your users receive from your app — signup confirmations, password resets, magic links, and more. These are the emails sent by your Supabase Auth layer, not marketing emails.
Before you start: Set up user authentication so your project has an auth database. Auth email templates only apply once auth is enabled.

Where to Find Templates

In your project, go to Database > Auth > Templates tab. You’ll see six templates you can customize, each with its own subject line, HTML body, and plain-text fallback.
TemplateWhen it’s sent
ConfirmationAfter signup, to verify the user’s email address
InviteWhen you invite someone to your team or app
RecoveryWhen a user requests a password reset
Magic LinkFor passwordless login
Email ChangeWhen a user updates their email, to confirm the new address
ReauthenticationBefore a sensitive action, to re-verify identity

Edit a Template

1

Open the Templates tab

Go to Database > Auth > Templates and click the template you want to edit.
2

Update the subject line

The subject is what users see in their inbox list. Keep it short and specific — “Confirm your email for Acme” beats “Email confirmation”.
3

Edit the HTML body

Write or paste HTML with inline CSS. External stylesheets won’t load in most email clients. Use Supabase template variables to insert dynamic values (see below).
4

Add a plain-text version

Recommended. Some email clients default to plain text, and spam filters like it when both are present. Include the same action link in plain form.
5

Preview

Click Preview to see the rendered HTML with example data. Fix any layout issues before saving.
6

Save

Click Save. The new template takes effect for the next email sent.

Template Variables

Supabase uses Go-style template syntax. The most common variables:
VariableWhat it returns
{{ .ConfirmationURL }}The action link (confirm, reset, magic link)
{{ .Token }}The OTP code for manual entry
{{ .Email }}The recipient’s email address
{{ .SiteURL }}Your configured site URL
{{ .RedirectTo }}The post-action redirect URL, if set
Use the exact syntax {{ .VariableName }} with the leading dot. If your emails arrive showing literal {{ .ConfirmationURL }} text, you’re missing the dot or a space.

Example: Branded Confirmation Email

<!DOCTYPE html>
<html>
  <body style="font-family: -apple-system, sans-serif; background: #f6f9fc; padding: 40px 0;">
    <table align="center" style="max-width: 520px; background: white; border-radius: 8px; padding: 40px;">
      <tr>
        <td>
          <img src="https://yoursite.com/logo.png" alt="Your Brand" style="height: 32px; margin-bottom: 24px;" />
          <h1 style="color: #111; font-size: 22px; margin: 0 0 16px;">Confirm your email</h1>
          <p style="color: #555; line-height: 1.6;">
            Thanks for signing up. Click the button below to confirm your email address.
          </p>
          <a href="{{ .ConfirmationURL }}"
             style="display: inline-block; background: #4f46e5; color: white; padding: 12px 24px; border-radius: 6px; text-decoration: none; margin: 24px 0;">
            Confirm email
          </a>
          <p style="color: #888; font-size: 13px;">
            Or paste this link into your browser:<br />
            <span style="color: #4f46e5;">{{ .ConfirmationURL }}</span>
          </p>
        </td>
      </tr>
    </table>
  </body>
</html>
Keep templates under 100KB. Email clients clip longer messages, and users won’t see the action link.

SMTP Is Required

Auth emails only send once SMTP is configured. You have two options on the SMTP tab of the same Auth page:
  • Hiveku Email — use your project’s built-in email service (easiest, no setup)
  • Custom SMTP — bring your own provider (SendGrid, Postmark, your own SMTP server)
If SMTP isn’t configured, templates will save but no emails go out.

Verify Your Changes

1

Sign up as a test user

Use an email address you control (a +test alias is handy).
2

Check the inbox

Confirm the new subject, branding, and content show correctly.
3

Click the action link

Verify the link works — it should confirm the account, reset the password, or whatever that template is for.

Troubleshooting

SMTP isn’t configured yet. Go to the SMTP tab and either enable Hiveku Email or add your provider’s credentials. Without SMTP, auth emails are queued but never sent.
Use exact Go template syntax — {{ .ConfirmationURL }} with a leading dot and spaces around the variable. A missing dot or a typo in the variable name means it’s rendered as literal text.
Your sending domain isn’t verified. See Email domains to add SPF, DKIM, and DMARC records. Unverified domains get filtered aggressively.
Email clients strip external CSS. Use only inline styles. Avoid flexbox and grid — use tables for layout. Test with the Preview button and with real test emails across clients.

What’s Next?

Set Up User Authentication

Enable signup, login, and password reset flows

Email Domains

Verify your sending domain so emails land in the inbox