# Mautic redirects domain root to the sub-folder

**URL:** <https://forum.mautic.org/t/mautic-redirects-domain-root-to-the-sub-folder/31012>\
**Category:** Product Support\
**Created:** [February 22, 2024, 9:00am UTC](https://forum.mautic.org/t/mautic-redirects-domain-root-to-the-sub-folder/31012 "2024-02-22T09:00:03Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ssdesign](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/ssdesign/32/10291_2.png) [@ssdesign](https://forum.mautic.org/u/ssdesign)\
**Post date:** [February 22, 2024, 9:00am UTC](https://forum.mautic.org/t/mautic-redirects-domain-root-to-the-sub-folder/31012/1 "2024-02-22T09:00:03Z")

</div>

**Your software**  
My Mautic version is: 4.0  
My PHP version is: 7.4.33  
My Database type and version is: Mariadb

**Your problem**  
My problem is:  
I installed Mautic inside a folder called “mautic” on my website.  
I can access it by going to:

- [mautic.domain.com/mautic](http://mautic.domain.com/mautic)  
But somehow all my requests to the root [domain.com](http://domain.com) are getting redirected to
- [domain.com/mautic](http://domain.com/mautic)

Any idea how I can prevent this redirect of the root domain to a mautic directory?

Also, when I access my root domain using the IP address, it does not redirect.

Thanks

These errors are showing in the log:

Steps I have tried to fix the problem:

---

<div class="post-metadata">

**Author:** ![mzagmajster](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/mzagmajster/32/687_2.png) [@mzagmajster](https://forum.mautic.org/u/mzagmajster)\
**Post date:** [February 23, 2024, 8:48am UTC](https://forum.mautic.org/t/mautic-redirects-domain-root-to-the-sub-folder/31012/2 "2024-02-23T08:48:10Z")

</div>

That is probably because of the apache configuration that ships with mautic. I am guessing you are using apache because .htaccess files are shiped with mautic core and by default its meant to run mautic on domain root. If you want to server it from sub folder you have to adjust the .htacces files (or any other web server ccnfig that you might have).

---

<div class="post-metadata">

**Author:** ![ssdesign](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/ssdesign/32/10291_2.png) [@ssdesign](https://forum.mautic.org/u/ssdesign)\
**Post date:** [February 23, 2024, 5:18pm UTC](https://forum.mautic.org/t/mautic-redirects-domain-root-to-the-sub-folder/31012/3 "2024-02-23T17:18:08Z")

</div>

Yes, I was able to fix it.  
I had to change the SSL Conf files to fix the issue.

Thanks
