How Mautic CORS settings decide which websites can send data
CORS restriction tells Mautic which websites are allowed to send tracking and form data from a visitor's browser. A team needs it when marketing sites, landing pages or embedded forms call the Mautic instance directly from the browser, and the team wants those requests to succeed only from its own domains. Without a deliberate list, the instance can accept cross-origin requests from sites the organization does not control, which makes form spam, injected tracking calls and mismatched contact data harder to contain. The control sits in the Mautic configuration, not in the web server alone, so the work is a configuration task on the instance itself.
Before changing anything, the implementation team should list every origin that loads the tracking script or posts a form: production sites, staging hosts, any subdomain used for landing pages, and any third-party site that embeds a Mautic form. Each entry must match the scheme, host and port that the browser actually sends, because the browser compares the full origin, not just the domain name. The exact option names, labels and matching behavior, including how trailing slashes are treated, must be confirmed against the Mautic documentation for the release in use, since these settings have changed across releases. Note the result of this inventory in the change record so the list can be reviewed when a new site is launched.
The second step is testing the result from a real browser session rather than trusting the saved configuration. The team should load each permitted page, confirm that tracking and form submissions succeed, and then repeat the test from a page on an origin that is not on the list to confirm the request is refused. Browser developer tools show the response headers and any blocked requests, which makes it clear whether a failure comes from the CORS list or from an unrelated problem such as a mixed-content warning. Repeat these checks after every Mautic upgrade and after any change to the proxy or domain settings, because a successful test today does not prove the same behavior on the next release.
Restrict Domains and Valid Domains: which option fits which setup
This table compares the Restrict Domains switch and the Valid Domains list as cross-origin settings in Mautic. Read each row as a question you need to answer for your own sites, then confirm field names and accepted formats in the documentation for your installed version before changing anything.
| Question | Restrict Domains | Valid Domains |
|---|---|---|
| What it controls | Whether Mautic applies a domain restriction to cross-origin requests at all, so the list below it takes effect | The set of origins Mautic accepts when a browser sends tracking or form requests from another domain |
| Single-site setup | Enable it if the website that hosts your tracking script and forms is the only origin that should send data | List only the one public domain of the site, using the exact scheme and host it serves |
| Multi-site or multi-brand setup | Enable it so unrelated sites cannot post data into your contact records | List each brand, subdomain and landing page host that legitimately sends data, one entry per origin |
| If left open | Any website can submit tracking or form data that Mautic accepts, which can pollute contact and campaign data | Mautic accepts requests from origins you never intended, so the list offers no protection on its own |
| If set too narrowly | Enabling it without a complete list can block your own forms and tracking calls from working | Missing entries cause legitimate forms or the tracking script to fail silently in the browser, so check the browser console after changes |
| Dependency on the other option | Acts as the switch; the list is only enforced when the restriction is active | Has no effect unless the restriction is switched on, so confirm both are set together |
| Format to verify | Confirm the exact field label and its location in the configuration for your version | Confirm whether entries take a scheme, whether ports and wildcards are accepted, and how trailing slashes are handled |
| What to confirm in the docs | The version-specific description of the switch and any note about proxies or subdomains | The accepted entry format, separator, and how the list is matched against the request origin |
How browser cross-origin checks apply to tracking and forms
A browser checks cross-origin requests against the origin of the page that made them. When a page on your website loads a script, or submits a form, that sends data to a Mautic address on a different origin, the browser decides whether the request is allowed based on the origin of the page, not the address of the destination. An origin is the combination of scheme (such as https), host (the domain name) and port. Two addresses that differ in any one of these parts are different origins, so and are treated as separate sites even though a person would think of them as the same company. This is why the domain list you configure in Mautic has to match the origins your pages actually use, not just the brand name of the organization.
Mautic receives two kinds of traffic from your sites, and the distinction matters at a conceptual level. The tracking script runs in a visitor's browser and reports page views and activity back to Mautic. Form submissions are requests a visitor sends when they complete a form hosted on your site or embedded in it. Both can cross origins, but they reach Mautic through different routes and may be affected differently by the same setting. Do not assume that a setting which works for tracking also covers forms, or the reverse. Confirm, for your Mautic version, which endpoints the tracking script and form submissions call, and test each one from a page on every origin you plan to allow.
Before you change anything, make an inventory of every origin that loads Mautic code or posts to it, including staging hosts, landing page subdomains and any third-party pages that embed your forms. Record the scheme, host and port of each one. Then check the Mautic release documentation for your installed version and confirm the exact behavior of the cross-origin settings, since the supplied material does not establish which response headers Mautic sends or how each endpoint responds. Plan a test in which you submit a form and fire the tracking script from an origin on your list and from one that is not on it, and record what the browser reports in each case.
How a marketing site request reaches Mautic and gets checked
The flow starts with a visitor's browser loading a page on one of your marketing sites, which then runs the Mautic tracking script or submits a form to the Mautic endpoint. The browser sends the request across the trust boundary to the Mautic server, where the domain check compares the requesting site against the configured list of allowed domains. An allowed origin gets the response and the data is accepted, while a site that is not on the list is refused in the browser, so you should test both paths with a staging site and an unlisted test domain. The diagram is a conceptual view of the check and does not describe the exact request headers.
Requests from listed sites are accepted, while unlisted sites are refused at the Mautic server.
Setting Restrict Domains and the Valid Domains list step by step
This sequence turns Mautic's cross-origin restriction on so that only the websites you own can send tracking and form data to your instance. It ends with a tested allow list that you can show a reviewer.
Inventory every site that posts to Mautic
Before changing any setting, list every website, landing page host and subdomain that loads the Mautic tracking script, submits a Mautic form or calls Mautic's endpoints from the browser. Include staging and test hosts if they send real submissions. Your web team, marketing operations and whoever manages the site templates can usually confirm this list. The step is done when every page that talks to Mautic has an owner and an entry in a shared inventory document.
Confirm the scheme and host for each origin
For each entry, record the exact origin the browser will send, which is the scheme, host and port, such as https with a subdomain name. Check the live pages in browser developer tools, where the Network tab shows the origin of each request, rather than relying on the domain name alone. Note any site that is reached over both http and https, or with and without a www prefix, because each variant is a separate origin. The step is done when you have a written list where every item shows a scheme and host.
Enable Restrict Domains in the Mautic configuration
Sign in as an administrator and open the configuration area where Mautic holds its cross-origin and tracking settings. Find the Restrict Domains option and turn it on. The exact menu path depends on your Mautic version, so confirm it against the documentation for the release you run before you change anything. Save the configuration and clear the cache if your instance requires it. The step is done when the option shows as enabled after a reload.
Enter the exact origins in the Valid Domains list
Open the Valid Domains field and add one origin per line, copying the values from your inventory. Use the scheme and host exactly as the browser reports them, and follow the trailing slash rule in the version you run, which means you should not add a path or a slash unless the documentation for that release asks for one. Do not add wildcard patterns unless your version documents them. Save the configuration. The step is done when the saved list matches the inventory line for line.
Test from a page on each listed site
Load a test page on each listed site and confirm that the Mautic tracking script registers a visit and that a test form submission is accepted. Check the contact record in Mautic and the browser console for cross-origin errors. Repeat the test for each scheme and subdomain variant you listed. The step is done when every listed origin produces a recorded visit or submission with no blocked-request errors in the console.
Test from a page on an unlisted site
Host a simple test page on a site that is not in the Valid Domains list, such as a personal test host you control, and attempt a tracking call and a form submission from it. The browser should show a cross-origin block, and Mautic should not record a contact or visit from that origin. Keep the test page and its results in your change record. The step is done when unlisted origins fail and listed origins succeed, which confirms the restriction is working in both directions.
Record the list and schedule re-checks
Save the final Valid Domains list, the test results and the names of the people who approved it in your configuration record. Add a step to your change process so that any new landing page host, subdomain or staging site is added to the list and retested before it goes live. Ask your Mautic administrator or hosting partner to confirm how the list is included in backups and migrations. The step is done when the list, test evidence and change procedure are stored together and someone owns them.
Scheme, subdomain and trailing slash cases that break allowlists
A browser treats and as different origins, so an entry for one scheme does not cover the other. When a page served over HTTPS sends a tracking or form request to an HTTP address, the browser typically blocks the response. The page often shows no error, and the form appears to submit while the data never reaches Mautic.
- Mixed content: Pages loaded over HTTPS that call an HTTP Mautic endpoint fail in the browser before Mautic logs anything.
- Redirects: An HTTP to HTTPS redirect on a tracking or form URL can change the origin the browser checks, so test the final URL, not the first one.
- Entry to match: Enter the scheme your public sites actually serve, and confirm whether your Mautic release stores the scheme as part of each entry.
- Migration windows: During a move to HTTPS, list each scheme only for the period you need, then remove the old one.
Before go-live, load a page from each public site, open the browser developer console, and confirm that no CORS errors appear for tracking or form requests. Confirm the exact scheme handling in the Mautic documentation for your installed release.
www.example.com and example.com are different hosts, so an entry for one does not admit requests from the other. The origin the browser checks is the host shown in the address bar of the page that makes the request. Teams often list the host they type into their DNS panel instead of the host visitors actually load, which causes silent blocks on half of the site.
- Redirect behavior: If the apex redirects to
www, or the reverse, the host that makes the request is the one visitors finally land on. - Illustrative example: A site served at
www.example.comthat posts forms to a Mautic address on a sibling host needswww.example.comon the list, not onlyexample.com. - Both hosts in use: If both hosts serve pages, list both, and confirm that each one is intentional.
- Content delivery and hosted pages: Pages served through a third-party platform may run on a host that differs from your primary domain, so inspect the real origin.
For each public site, record the origin reported in the browser console, then compare it with the Valid Domains list. Confirm in the documentation for your release how Mautic handles entries with and without a www prefix.
Each subdomain is its own origin. A list that names example.com does not automatically cover shop.example.com, app.example.com or a staging host such as staging.example.com. Staging hosts cause the most trouble because teams test forms there, then find that production works only after a separate entry is added, or they leave staging entries in production and widen the allowed surface without noticing.
- Each subdomain listed: Add every host that sends tracking or form data, one entry per host.
- Wildcards: Do not assume wildcard entries are supported; confirm the syntax and matching behavior for your release before you rely on one.
- Staging separation: Keep staging hosts on a separate Mautic instance, or limit their entries to a test list that is removed before launch.
- Stale entries: Review the list after each site change, because retired hosts stay on the list until someone removes them.
Keep a written inventory of every host that loads Mautic scripts or submits forms, and reconcile it against the Valid Domains list at each release or site change. Confirm the wildcard and subdomain rules in the documentation for your installed release.
The origin includes the port. A site on uses the default HTTPS port, while the same site on is a different origin. Teams that run staging or preview environments on non-standard ports, or that route traffic through a proxy with an unexpected port, often find that the browser sends requests from an origin that was never added to the list.
- Default ports: Entries for default ports should match the form the browser reports, so confirm whether your release accepts entries with or without the default port.
- Non-standard ports: Any origin that uses a custom port needs the port included in the entry.
- Proxy and load balancer ports: Check the port the browser sees, which may differ from the port on the internal server.
- Local testing: A developer machine on a different port needs its own entry, or testing should happen on a staging host that is listed deliberately.
To verify, open the page that sends the request, read the origin in the developer console or network panel, and compare the port with the entry. Confirm in the documentation for your release how Mautic compares ports and whether the default port must be written out.
A trailing slash changes the text of an entry, and a list that compares text exactly will treat example.com/ and example.com as different values. Browsers report an origin without a path, so a trailing slash in the list may never match. The result is a silent block that looks like a Mautic or script fault, even when the entry looks correct to the person who typed it.
- Origin format: Browsers report the scheme, host and port only, so enter the origin in that form unless your release documentation says otherwise.
- Paths in entries: Do not add path segments such as
/landingto an entry, because the browser does not send paths as part of the origin. - Copy and paste errors: Values copied from a documentation page, a spreadsheet or a ticket often carry a trailing slash or a trailing space, so review the saved value.
- Consistent entries: Use one format for every entry so that future reviewers can compare the list at a glance.
After saving the list, submit a test form from each public site and confirm the request succeeds. Confirm the exact matching rules, including trailing slash handling, in the documentation for your installed Mautic release.
Security risks when the allowlist is too broad or out of date
A Valid Domains list is only as safe as its last review. The risks below share a cause: an entry stays in the list after the site it names has changed, moved or stopped being yours.
Overly broad entries
A broad entry, such as a parent domain or a pattern that matches many subdomains, lets any host under that name send tracking and form data to Mautic. Attackers can register or take over an unused subdomain and post contacts or events into your database. Replace broad entries with the exact hostnames that serve your pages and forms. During each scheduled review, confirm that every entry matches a live site you own and that no entry covers hosts you do not manage.
Leftover staging and retired domains
Staging, preview and campaign microsites often remain in the list after launch. Their hostnames may later expire, be reassigned, or be left running with weaker controls than production. Record an owner and a purpose for each entry, and remove it in the same change that decommissions the site. At each review, compare the list against your current DNS records and web inventory, and remove any name that no longer resolves to a site you run.
Mixed http and https entries
An http entry accepts requests from an origin that does not use TLS, so the same site name can appear under two schemes with different trust levels. Scheme matching is exact, so an http entry does not cover an https page and the reverse, which makes mixed lists hard to reason about. Keep only the https origin for each production site and test form submissions and tracking calls from each listed origin. Confirm how your Mautic version handles trailing slashes so each entry matches the origin the browser sends.
Third-party sites that should never send data
Partner portals, agency test pages, content syndication sites and copies of your forms hosted elsewhere sometimes get added to the list to make a campaign work. Any site on the list can submit data to your Mautic instance on behalf of a visitor, which is a route for spam, injected contacts and consent records that do not match what the visitor saw. Allow only domains your organization controls. For embedded forms on partner sites, ask the partner to host the form or to submit through a controlled endpoint.
Change control when sites are added
Without a defined path, entries are added quickly during launches and never reviewed. Require a change request for each new origin that names the site owner, the business purpose, the exact scheme and hostname, and the test that proves tracking and forms work from that origin. Apply the change in a non-production instance first, then record the approval in your change system. Keep the change log with the configuration so auditors and the next administrator can see why each entry exists.
Reverse proxy and trusted host settings
The origin Mautic compares is the one it receives after the proxy, so a proxy that changes the scheme, host or port can cause valid sites to fail or can make an entry match more than intended. Trusted proxies and trusted hosts control which forwarded headers Mautic believes, so a loose setting there can weaken the allowlist. Align the site URL, trusted proxies and trusted hosts with the public hostnames in the Valid Domains list. Retest tracking and forms after any change to the proxy, load balancer or certificate setup.
Testing the allowlist before and after go-live
Run the allowlist test before any public page goes live, and treat it as a checklist that covers every origin on the Valid Domains list. Host a small test page on each listed site, using the exact scheme, host and port that appear in the list, including whether an entry carries a trailing slash. Load the page in a current browser, send a tracking request and a form submission, and confirm in the developer tools that the response allows that origin. Then run the negative test: load the same page from an origin that is missing from the list, such as a staging host or a lookalike subdomain (illustrative). The request should be refused, and the refusal should show in the browser console. Confirm the expected response for your Mautic version in the vendor documentation, because the exact behavior depends on the release and the settings you chose.
Next, check that allowed traffic actually lands in Mautic. Submit each form from each listed origin and confirm that the contact record, the form submission and the source page appear in the contact timeline. Load a tracked page from each origin and confirm that the page hit is attached to the correct contact. Repeat the same submissions from the blocked origin and confirm that Mautic records nothing from them. Any listed origin that produces no records points to a gap, either in the allowlist entry or in the page itself. Note the identifier of each test contact so the events can be traced later, and delete the test contacts from production data once testing is complete.
Repeat the full test after any change that can alter how the browser sees the site: proxy or load balancer rules, the public domain, certificate replacement, redirects or a new subdomain. A certificate renewal looks routine, but a change in scheme or host name is exactly what breaks an exact-match entry. Keep a dated test record for every run, listing the Mautic version, the values of the Restrict Domains and Valid Domains settings, the origins tested, the test page addresses, the pass or fail result for each check, the tester's name, and the console or HAR captures that serve as evidence. Store the record with your change tickets so that an auditor or security reviewer can see what was tested, when, and against which configuration.
What to confirm in your Mautic version and environment
Mautic's cross-origin settings depend on the release you run, the request path in front of it and any extensions you have added. The cards below list what to verify in your own environment rather than assume, so the allowed domains you set match the traffic Mautic actually receives.
Option names and location by release
The Restrict Domains switch and the Valid Domains list are the settings this topic depends on, but their labels and location in the admin area can change between releases. Confirm them in the exact version you run, using that version's documentation rather than a newer one. Record the path you used so the next upgrade review can repeat the check. Read the labels from your own admin screen before editing anything.
Mautic releasesSupport window for your release line
Cross-origin behavior is only worth tuning on a release that still receives security fixes. Check the support end date for your line on the releases page, and note that Mautic 5.2 and 6.0 have different end dates. If your line is close to its end, plan the upgrade before you invest in a detailed allowlist, because the configuration will need to be reviewed again on the new version.
- Mautic 6.0 security end
- 30 September 2026
Load balancer and SSL proxy behavior
Origin checks compare the scheme, host and port of the request that reaches Mautic. When a load balancer or SSL-terminating proxy sits in front, the application may see plain HTTP even though visitors use HTTPS. Confirm which scheme and host header Mautic receives, and test a tracking request from each public site through the same path users take. Mismatched schemes are a common reason valid sites appear blocked.
Plugins and themes with their own cross-origin rules
A plugin, custom theme or form integration may send its own headers or call Mautic from another origin. Those rules can widen or override what the core settings allow. List every installed plugin and theme, then search each one for header or origin handling. Treat any extension that adds cross-origin behavior as a separate item to review and test.
Interaction with the site URL
The configured site URL tells Mautic how to build links, tracking script addresses and return paths. If it does not match the domain visitors actually use, tracking requests can go to the wrong host even when the allowlist is correct. Confirm that the site URL, the allowed domains and the tracking script host agree, and that a test request from an allowed site succeeds while one from an unlisted site is refused.
How much effort does locking down Mautic CORS take, and what do you need to provide?
How long does it take to lock down Mautic CORS settings?
The duration depends on how many sites send tracking and form data to your Mautic instance, and no fixed timeline applies to every environment. The configuration change itself is small, so most of the time goes into building an accurate list of allowed origins and testing each site. Ask for the timeline to be written into the scope, with the number of sites, subdomains and environments it covers stated explicitly, so you can check the estimate against your own inventory.
Can an internal team restrict Mautic domains without a partner?
Yes, an internal administrator with access to Mautic's configuration can set Restrict Domains and maintain the Valid Domains list. The harder part is knowing every origin that legitimately loads your tracking script or forms, including subdomains, staging sites and third-party pages. A partner adds value through a structured inventory, testing from each origin and documented results. Your team can do the work alone if it has the site list, test access to every environment and someone who can verify blocked requests.
What drives the effort of restricting which websites can send data to Mautic?
The effort rises with the number of places that need to be allowed and the number of systems that alter the request before Mautic receives it. The main drivers are:
- The number of production sites with the tracking script or embedded forms
- Subdomains, regional domains and preview or staging environments
- Reverse proxies, load balancers or CDNs that change the origin Mautic sees
- Landing page builders and third-party tools that submit data on your behalf
Each additional category multiplies the test cases, so ask the partner to count them in the written scope.
What does your team need to provide before a Mautic CORS review starts?
Before work begins, you need to provide the inputs that define the allowed list and the test plan. Typically these include:
- A site inventory listing every origin, including scheme, subdomain and port where it applies
- Administrator access to Mautic and to the web server or proxy configuration
- A change window agreed with the teams that own each site
- Test pages for each site, or permission to create them
- A named contact for each form or tracking owner who can confirm legitimate origins
Missing inventory items are the most common cause of blocked forms after a change, so treat this list as a gate.
Will the engagement deliver testing evidence for the CORS configuration?
DeployOpen documents the work it performs, and a CORS engagement can include recorded test results for each allowed origin and each blocked origin. The exact format, such as a test matrix, screenshots or request logs, should be agreed in the written scope before work starts. Evidence from DeployOpen describes what was tested and what happened. It does not replace a review by your internal security team or an independent auditor, and it does not amount to a certification.
Does changing Mautic CORS settings require downtime or a maintenance window?
Confirm this against the documentation for your Mautic version and your hosting setup before scheduling the change. Because a wrong origin list can stop tracking and form submissions on live sites, most teams schedule the change in a window and test immediately afterward. Ask the partner to state which steps need a window, which can be done during normal operations, and how a rollback would be executed if a legitimate site is blocked.
How is the cost of CORS work structured, and what recurs after launch?
Mautic is free, open-source software, so the cost is the labor to configure, test and document the restriction, plus any infrastructure you run. The initial configuration and testing are one-time costs. Recurring effort appears when new sites, subdomains or landing pages need to be added, or when a proxy or domain changes. DeployOpen works from a fixed-scope written agreement and provides quotes from that scope. Ask for a quote that separates the one-time setup from any retainer for ongoing additions and retesting.
How DeployOpen works on this
DeployOpen approaches Mautic domain controls as a scoped change to your own deployment, starting from the list of sites that really need to send tracking and form data. We review the current settings, agree the domains in writing, apply the changes in your infrastructure and confirm them with test submissions from each site. The result is documented so your team can maintain the list as your websites change.
How we scope
- We inventory every site, landing page and form host that sends tracking or form data to your Mautic instance.
- We record exact scheme, host and port for each domain so the Valid Domains list matches your real traffic.
- The written scope states which Mautic settings change, which sites are covered and what testing signs off the work.
How we build
- We enable the Restrict Domains setting and populate the Valid Domains list in your Mautic configuration.
- We check trailing slash and scheme handling against each site, including staging and any proxy-fronted hostnames.
- We test tracking script requests and form submissions from each allowed site and from an unlisted origin to confirm rejection.
How we hand over
- You receive the final domain list, the configuration changes made and the test results for each site.
- We document how to add or remove a domain, who approves the change and how to retest after a website move.
- Your team walks through the runbook so the list stays accurate after the engagement ends.
How we support
- Ongoing support and retainers are available if your website footprint or Mautic release changes over time.
- Retesting after Mautic upgrades or new landing page domains can be included in a retainer scope agreed in writing.
- Our written quote follows from the agreed scope, so you can compare it with the cost of keeping the list in-house.

