This is a hot topic, as cookie based tracking can be tricky in a multi-domain environment. I started to work on a solution couple of months ago, and ended up creating a plugin, that helps with the multi-domain tracking.

In order to get you covered in your multi-domain tracking endeavors, I would like to share 2 videos and some code with you. Have fun.

If you are trying to track multiple domains with Mautic, you’ll face the following issues:

  • You need to serve first party cookie to your Mautic domain on every tracked domain.

This means: if you have Mautic on, you can’t freely track anymore. You need to set up a tracking domain using a CNAME, like, that resolves to

  • In order to have great inboxing rate you’ll need to keep the domains in your email relevant to the sender, and the content you are sending.

This means: if your Mautic is on, all your unsubscribe links and other links in your emails will have This domain can influence your inboxing rate even if you send from However you can add tracking domain in this case as well, and with the help of the Multi-Domain plugin you can now mask all your links and delete tracks from the Mautic domain.

You can learn more about why Multi Tracking matters in the following Mauticon presentation:

Watch the Marketing Automation Show for a walkthrough, and start using Multi-Domain tracking

You can download the plugin here:

Do you have questions? Add it to the comments!

31 Comment

  • Marcel


    Just wanted to check if I understood everything since my set up is somewhat different.
    My Mautic instance is at

    And I have another website at another server

    So in cPanel at, I create a CNAME

    pointing to

    And in cPanel at, I create an add-on domain

    with subdomain

    pointing to the root of my Mautic instance.

    Next in my site, I change the tracking link to

    instead of

    And finally, in Mautic in the Multidomain plugin settings, I want

    to use the domain

    • Nezam


      There is a simpler way if you are using CyberPanel. Just add the as an Alias domain to Mautic domain and add a CNAME for pointing to Mautic domain. Thats it!

  • Max


    Just installed.

    Beyond the dns and server configurations, are there any configurations with the plugin itself.

    I don’t see the Multidomain plugin settings?

    • jos0405


      Hi, no other settings are needed.
      All tracking links will be overwritten based on the Multi Domain settings (left menu.) Add the email and the domain that should be used for masking.
      As it is in Beta, newsletter image content is not overwritten, you have to do it in your html.

    • jos0405


      No because bounce handling is a return process, you will still listen on the same channel with the same domain as before.

  • Luca


    Thanks for the plugin and the explanation.

    You said that the current version of the plugin only works with Mautic 3.x
    Any idea when there will be a version of the plugin that works with Mautic 4?

  • Neo


    has anyone tried accessing your website using latest safari browser , where 3rdparty cookies do not work, and succeeded with this configuration ?
    will mautic forms work too ?

    • jos0405


      The point is, that you serve first party cookies, so you are not affected by evil Safari rules.
      Forms? Hmm. I’m not sure, good point ๐Ÿ˜€

  • R el


    Anyway to change the message-id in the header? The plugin is working good, however the message-id: still shows the original host domain, not the tracking domain.

  • Steve Robinson


    Any ideas on how to make dynamic web content work across domains? It seems that the DWC http request goes to the base URL in the configuration regardless of what domain is used to call mtc.js.

    • jos0405


      Hello Steve!
      Good question. It depends on website settings I beleive, but you can always CNAME the other domain, so you would stay in the first party realm.

  • Pete Petrov


    Hi Joe,

    I can not install it on Mautic 4.4.1. I have uploaded it to plugins folder, but it doesn’t show in my plugins. Any idea what could be the issue?


  • Jan


    Hello Joe, After uploading the plugin to my plugin folder and deleting the cache and pushing the ‘Insatall/upgrade plugins’ button, the plugin is not showing up.

    This is the content of my plugins folder with the Owner / Group and permissions:
    drwxr-xr-x 14 www-data www-data 4096 Feb 28 2022 GrapesJsBuilderBundle
    drwxr-xr-x 17 www-data www-data 4096 Feb 28 2022 MauticCitrixBundle
    drwxr-xr-x 12 www-data www-data 4096 Feb 28 2022 MauticClearbitBundle
    drwxr-xr-x 9 www-data www-data 4096 Feb 28 2022 MauticCloudStorageBundle
    drwxr-xr-x 15 www-data www-data 4096 Feb 28 2022 MauticCrmBundle
    drwxr-xr-x 9 www-data www-data 4096 Feb 28 2022 MauticEmailMarketingBundle
    drwxr-xr-x 16 www-data www-data 4096 Feb 28 2022 MauticFocusBundle
    drwxr-xr-x 13 www-data www-data 4096 Feb 28 2022 MauticFullContactBundle
    drwxr-xr-x 6 www-data www-data 4096 Feb 28 2022 MauticGmailBundle
    drwxr-xr-x 13 www-data www-data 4096 Aug 31 11:11 MauticMultiDomainBundle
    drwxr-xr-x 7 www-data www-data 4096 Feb 28 2022 MauticOutlookBundle
    drwxr-xr-x 17 www-data www-data 4096 Feb 28 2022 MauticSocialBundle
    drwxr-xr-x 13 www-data www-data 4096 Feb 28 2022 MauticTagManagerBundle
    drwxr-xr-x 4 www-data www-data 4096 Feb 28 2022 MauticZapierBundle

    I have installed the plugin on a fresh Mautic 4.2.0 instance

    Any Idea what could have gone wrong?

  • George


    Hey Joey, could you help.

    Before the installing the plugin… I send a test message to one contact… All good.

    After installing the plugin ( Tried With and Without adding a domain+email pair in the plugin)… When i send a test email i get:
    Uh oh! I think I broke it. If I do it again, please report me to the system administrator!
    500 Internal Server Error

    PHP Version 7.4.32
    Mautic v4.4.3

    Thank you!

  • charlse


    Hey Joey, could you help.
    Hi, I installed and used this plugin before and it worked fine.
    Itโ€™s just that all the links in my email have been modified to the new domain name, so I deleted the configuration of this plugin, but the links in the email did not restore to the system domain name I configured; then I deleted the plugin and cleared the cache directory. But the link in the email still hasn’t returned to the system domain name I configured.

    I would like to ask how can I completely restore the domain name configured in my system.
    may thanks!

    • jos0405


      Hi, I also answered you on Youtube, where you left the same comment.
      If you remove a plugin, clear the cache and maybe also run bin/console mautic:plugins:reload, then it should be gone from your system.

  • Dinos


    Everything you describe here works perfectly. There is still a problem though when not sending email.

    When you inject a form using the provided script then the generated form uses the domain set in configuration –> system settings -> site url

    even if you use the cname domain, all caprtcha js e.t.c will be taken from main mautic url and not the cname one

    The only workaround i have found so far is to use the manual copy method to inject the form to a website replacing the mautic domain with the configured cname as described in the article

    Have you got a better workaround for this?
    Keep up the good work
    Thank you in advance

    • jos0405


      Hello Dinos,
      Thank you for this comment. Yes, need to take a look.
      We already fixed issues with tracking (same situation)


Leave a Reply

Your email address will not be published. Required fields are marked *