Skip to content
Documentation

CORS Settings

When setting up Cross-Origin Resource Sharing (CORS), you're essentially creating a secure bridge between the customer’s website and Mautic. This process ensures that only authorized domains can communicate with their instance, protecting it from unauthorized access while making sure that tracking data is not blocked.

Requirements

  • Access to Mautic's administration panel
  • List of domains that need to communicate with Mautic

Info

No list? Ask to the customer.

Step-by-step guide

  1. Navigate to Configuration > System Settings in your Mautic
  2. Locate the CORS Settings section
  3. Enable domain restrictions by setting "Restrict Domains" to Yes
  4. Add your authorized domains in the Valid Domains field:
    • Enter one domain per line, including all variants:
      • https://example.com
      • https://www.example.com
  5. Save the configuration

How do I know if I executed this process correctly?

  • Their websites can successfully send data to Mautic
  • Tracking scripts load without CORS errors in browser console
  • Visitors will start having a history of visited pages

Note

Adding all domain variants (with and without www) helps prevent common issues. While not the most elegant solution, it's more reliable than having to debug issues later.