# Best approach to install Mautic in a subfolder

**URL:** <https://forum.mautic.org/t/best-approach-to-install-mautic-in-a-subfolder/33322>\
**Category:** Product Support\
**Tags:** mautic-4\
**Created:** [August 29, 2024, 11:44am UTC](https://forum.mautic.org/t/best-approach-to-install-mautic-in-a-subfolder/33322 "2024-08-29T11:44:42Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![pro-emailer](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/pro-emailer/32/12615_2.png) [@pro-emailer](https://forum.mautic.org/u/pro-emailer)\
**Post date:** [August 29, 2024, 11:44am UTC](https://forum.mautic.org/t/best-approach-to-install-mautic-in-a-subfolder/33322/1 "2024-08-29T11:44:42Z")

</div>

My Mautic version is: v4.4.12

Hi,

I have successfully installed Mautic in a subfolder.

The typical setup is to install it in the root domain, but for my case, I wanted to keep the root domain for the website and set up Mautic in a separate folder.

Root URL: [https://www.primeogroup.com/](https://www.primeogroup.com/)  
Sub Folder: …/XXX

To make this possible, I changed the .htaccess file by prepending “XXX”.

\<If “%{REQUEST\_URI} =~ m#^/XXX/(index|index\_dev|upgrade/upgrade).php#”\>

It worked cool, but after upgrading Mautic, the .htaccess file gets overridden. So, after each update I need to correct it again.  
Do you have a better approach for this specific use case?

---

<div class="post-metadata">

**Author:** ![joeyk](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/joeyk/32/11164_2.png) [@joeyk](https://forum.mautic.org/u/joeyk)\
**Post date:** [August 30, 2024, 6:00am UTC](https://forum.mautic.org/t/best-approach-to-install-mautic-in-a-subfolder/33322/2 "2024-08-30T06:00:31Z")

</div>

Hello, the typical setup is install on a subdomain, not root domain, so you can benefit from the same domain tracking possibilities.

Installation is a folder wouldn’t be a pro approach.

---

<div class="post-metadata">

**Author:** ![pro-emailer](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/pro-emailer/32/12615_2.png) [@pro-emailer](https://forum.mautic.org/u/pro-emailer)\
**Post date:** [August 30, 2024, 11:23am UTC](https://forum.mautic.org/t/best-approach-to-install-mautic-in-a-subfolder/33322/3 "2024-08-30T11:23:59Z")

</div>

Hi @joeyk,

I considered using subdomains, but I have specific requirements that involve managing multiple and undetermined number of setups, which means I’ll need to handle DNS records frequently. To address this, I plan to set up a wildcard subdomain mechanism with SSL certificates to ensure flexibility.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/1X/43c63600fe51440378769136903f1fa2a9a34102.png) [@system](https://forum.mautic.org/u/system)\
**Post date:** [August 31, 2024, 11:24pm UTC](https://forum.mautic.org/t/best-approach-to-install-mautic-in-a-subfolder/33322/4 "2024-08-31T23:24:13Z")

</div>

This topic was automatically closed 36 hours after the last reply. New replies are no longer allowed.
