How to add a MailerLite signup form to your website

Create a MailerLite embedded signup form, add its two code snippets to an HTML page, and check the subscription and confirmation in the right group.

Beginner7 min read
In this guide

A signup form is working when a visitor can subscribe and you can find the resulting subscriber in the right group. Seeing an email field on the page is only the first half of that check.

Here you will create one MailerLite embedded form: a form that sits inside your page rather than appearing in a popup. You will add MailerLite’s two generated snippets, submit an address you control, and check the confirmation. No welcome automation is needed.

Start with a page you can edit

You need an existing MailerLite account with room for another form, an inbox you are allowed to subscribe, and an HTML page you control. This guide uses direct HTML editing: you can open the page’s source, save it, and serve or publish it using your existing website setup. Use a test page before changing a busy public page.

If your site builder does not let you add scripts and custom HTML, check its embed support first. The browser preview of an editor may also behave differently from the rendered page. For WordPress, MailerLite’s official integration instructions are a separate path.

These instructions use the current MailerLite interface, checked September 25, 2026. Check your form allowance in your account; an active trial can expose features that will not remain on Free. The default confirmation email is enough for this task, but the account still needs a valid sender and permission to send it.

Create the form and choose where subscribers go

Open Forms, select Embedded forms in the form-type tabs or dropdown, and click Create form. Name it Website signup; this name is for you, not the visitor. Choose the embedded type if the creation screen asks, then continue.

Select the group for this form. A group is a named collection of subscribers you can later choose for a newsletter. For a first test, use Create group to make Website signup test, select its checkbox, and continue into the editor. Keep this test group separate from your real audience. Check Automations before submitting: no active workflow should trigger from joining this group or completing this form. Do not disable a working newsletter workflow; use a separate test form and group instead.

Tell visitors what they are subscribing to

Click the heading and text in the form preview. Replace the placeholder with a simple promise you intend to keep. For a practice form, use:

Join the website checklist test

This is a practice mailing list. Subscribe to test the confirmation email. No automatic newsletter will follow.

Keep the email field and Subscribe button. You do not need a name, phone number, or other extra fields for this check. On a public form, explain the actual content and frequency, and provide your appropriate privacy information before inviting subscriptions.

Click Success message at the top of the editor. This is the message displayed after the visitor submits the form, before any email confirmation. Change the heading to Check your email and the text to:

If your subscription needs confirmation, open the email we send and click its confirmation button. Check Spam too. Already subscribed? You do not need to confirm again.

Save the text settings and click Done editing. On the form’s Overview, leave Double opt-in on. That means a new subscriber confirms through an email before becoming active. An already-active subscriber does not receive another confirmation just because they submit the form again.

Open the form’s Double opt-in tab; on narrow screens, select it from the Overview dropdown. Under Confirmation email, check Sender. If it is missing or incorrect, use its Edit control to set an address your account is allowed to send from. Complete any required verification before testing. If MailerLite requires domain authentication, use its official sender setup guide; changing the form’s design will not solve a sender restriction. Return to Overview for the embed code.

Add both pieces of code

In Overview → Embed form into your website, MailerLite supplies two pieces. Copy the values generated for your account and form; another site’s example identifiers will display the wrong form.

Generated code Where it goes What it does
JavaScript snippet, including its script tags Just before the page’s closing </head> tag Loads MailerLite’s form code; add it once per page
Short form placeholder with class="ml-embedded" Inside the page body, where the form should appear Identifies this particular form and its position

Open your HTML file in a text editor. Paste the first snippet before </head>, then the second at the desired place between <body> and </body>. Save the file and update your existing test website or local web server. Do not paste the snippets into a paragraph field that displays code as ordinary text.

Open the actual page in the browser and reload it. The heading, email field, and button should appear where you placed the placeholder. This form needs JavaScript and a request to MailerLite; the rest of your page need not depend on it.

If the form is missing, check that both snippets survived saving, that the form identifier matches the code in Overview, and that a browser extension or the site’s script policy is not blocking MailerLite. Do not switch off your site’s security policy wholesale. A builder’s unsupported embed feature is not fixed by repeatedly pasting the code.

Test submission and confirmation

First enter not-an-email and press Subscribe. The form should reject it instead of showing your success message. Do not test with a plausible address belonging to someone else.

Then enter your permitted test address and submit. You should see Check your email. For the full confirmation check, use an address that is not already active in this MailerLite account. A previously unsubscribed test address can also receive confirmation, but that is a repeat-signup case.

Open Subscribers in MailerLite, change the Active status filter to Unconfirmed, and find the address. Open its profile and check the group. Next, open its real confirmation email, check the sender and purpose, and click Confirm your email. Refresh the subscriber profile: it should now be Active, with the intended group.

If no email arrives, check Spam, the address you typed, and the subscriber’s current status before resubmitting. An existing active address is not a valid test of receiving a new confirmation email. Do not manually mark it active to make the check pass.

The form collects subscriptions; it does not send a newsletter by itself. Keep any promised follow-up accurate when you replace the practice text.

Finish the test without leaving an unwanted form

For a temporary page, remove the form placeholder, save, and update the page. Remove the universal script too if that page uses no other MailerLite form. Reload and check that the form is gone. Stop a temporary local server when you are finished.

Removing an embed does not disable the separate share URL shown in MailerLite. Keep a lab URL private; do not describe the form as globally switched off. If you need permanent removal, first check every placement and use MailerLite’s form-management controls deliberately. Do not delete a form used by a working site merely to tidy up a test.

For a real launch, keep the verified form in place and check it once more on the published page at a phone-sized width. A local test cannot verify your host’s script restrictions or the final site’s embed integration.

← Back to website guides