Salesforce Web-to-Lead: Setup Guide
Quick Summary:
Web-to-Lead generates HTML form code that captures website visitor submissions directly as Salesforce Leads -- free, but with known limitations around spam protection and validation error handling.
What Is Web-to-Lead?
Web-to-Lead is a free Salesforce feature that generates standard HTML form code, which you embed on your website. When a visitor submits the form, a new Lead record is created in Salesforce automatically -- no manual data entry, no separate integration tool required.
⚠️ Known Limitation
Web-to-Lead has limited native spam protection and no built-in way to show validation rule errors back to the website visitor -- a submission that violates a validation rule can fail silently, with no feedback to the person who submitted it. Most production implementations add reCAPTCHA and carefully test validation rule interactions.
How to Set It Up
Go to Setup → Web-to-Lead and select which fields to include on the form.
Set a default Lead Owner (or queue) for submissions that don't match any assignment rule.
Generate the HTML code, then embed it on your website, customizing the styling to match your site's design.
Add reCAPTCHA or another spam-prevention layer, since the native protection is minimal.
Test thoroughly, including scenarios that would trigger a validation rule, before going live.
A Real-World Example
A company's "Contact Sales" page needs to capture visitor inquiries directly as Leads, automatically assigned to the right regional rep based on the visitor's country field. A Web-to-Lead form, combined with a Lead assignment rule keyed on the country value, handles this without any custom development -- though the team specifically tests that no validation rule on the Lead object could silently block a legitimate submission.
💡 Pro Tip
Pass UTM parameters into hidden form fields to preserve campaign source data on the resulting Lead record -- without this, marketing attribution for web-captured leads gets lost the moment the form is submitted.
Frequently Asked Questions
Is Web-to-Lead free to use?
Yes, Web-to-Lead is included in Salesforce at no additional cost, generating standard HTML form code you embed on your website.
Does Web-to-Lead include spam protection?
Not natively in a robust way -- reCAPTCHA or a similar third-party spam protection layer is commonly added to Web-to-Lead forms, since the base feature has limited built-in spam filtering.
Can Web-to-Lead trigger automatic assignment to a sales rep?
Yes, combined with Lead assignment rules, incoming Web-to-Lead submissions can be automatically routed to the correct rep or queue based on criteria.
What\'s the daily submission limit for Web-to-Lead?
Limits vary by Salesforce edition, but there is a daily cap on Web-to-Lead submissions -- high-traffic sites should verify their edition's specific limit.
Can Web-to-Lead forms be customized with custom fields?
Yes, any Lead field (standard or custom) can be included in the generated form as a hidden or visible field.
Can I style a Web-to-Lead form to match my website\'s design?
Yes, since it generates standard HTML, you can freely apply your own CSS styling rather than using Salesforce's default unstyled form appearance.
What happens if a Web-to-Lead submission fails validation rules?
This is a known limitation -- Web-to-Lead submissions can silently fail if they violate a validation rule, since there's no native way for the form to display that error back to the website visitor.
Is Web-to-Lead being replaced by newer tools?
Salesforce increasingly promotes Flow-based web forms and Pardot/Marketing Cloud forms for more advanced use cases, though Web-to-Lead remains supported for simple lead capture.
Can Web-to-Lead integrate with Google Analytics or ad tracking?
Indirectly -- UTM parameters and hidden fields can be used to pass campaign source data into the Lead record, though this requires manual setup rather than being automatic.
Can a single website have multiple Web-to-Lead forms for different purposes?
Yes, multiple forms can be generated for different pages or campaigns, each optionally mapped to different default field values (like Lead Source) for tracking purposes.