Cannot access Mautic login

Your software
My Mautic version is: 3.1.2
My PHP version is: 7.3
My Database type and version is: MySQL 8

Your problem
My problem is: Cannot access dashboard

These errors are showing in the log:

Steps I have tried to fix the problem:

Hello Mautic community,

I am a Mautic enthusiast, I love it. And although I’m new to Mautic, I’ve started a project with it.

I have a problem that I hope someone can help me solve. I have installed, upgraded, configured, and running. But as I had a problem that in another topic I will tell if I don’t solve it, I have made a change.

The change that I have done:

  • Has changed to “YES” in CORS and I have placed the url where the web is in the white list (

URL of the web:
URL Mautic:

I have the .htaccess of Mautic, which I checked again and downloaded from here, please can someone help me? Because after the change I made I can not access the dashboard to revert it.

go to app/config/local.php and edit line 465

‘cors_restrict_domains’ => 0,

1 Like

I have done it and removed cache files but still keeps the same.

Maybe I have to remove the files on the array app/config/local.php and edit line 470


‘cors_valid_domains’ => array(
‘0’ => ‘’,
‘1’ => ‘’,
‘2’ => ‘’,
‘3’ => ‘

I also tried adding “Allow from all” to .htaccess on the part apache. but din´t work either
hank you for the response

Delete all this, Clear cache, verify file permissions of cache and logs.

1 Like

I removed the lines and let the array this way,

‘cors_valid_domains’ => array(

But still nos working

How can i verify permissions of cache and log?

Before we get into googling how to check file permissions, post your logs (usually in mauticinstall/var/log)

Have only this errors, on the mautic log: this two have happened before I changed CORS, this morning:

[2020-12-18 12:58:45] mautic.ERROR: returned 508
[2020-12-18 12:58:46] mautic.ERROR: returned 508

And after those lines I have a lot of lines on the log, and all the same:

[2020-12-18 18:17:38] mautic.ERROR: Uncaught PHP Exception Symfony\Component\HttpKernel\Exception\BadRequestHttpException: “Untrusted Host “”.” at /home// line 71 {“exception”:"[object] (Symfony\Component\HttpKernel\Exception\BadRequestHttpException(code: 0): Untrusted Host “”. at /home//, Symfony\Component\HttpFoundation\Exception\SuspiciousOperationException(code: 0): Untrusted Host “”. at /home//"}

Most of them are before the change, I don´t know the exact hour of the change, but I think all of them before the change. And now there are no new logs

The permissions for the VAR folder look well?


508 Error indicates a resource limit problem. Have a look at Php.ini file for limits that need to be adjusted. This issue may be unrelated to the CORS settings as it has nothing to do with the issue you describe.
List the specs of your VPS/Server

1 Like

But after the error Mautic run well for hours until I changed CORS and right after that the site was unreachable. I am on a share hosting A2 Hosting, the lower hosting, now I am planning to upgrade as long as the site is already configured… all of that if I get to make it run again… :frowning:

This are the stats of the hosting:

I contacted A2hosting support but i am not having good experience… Still waiting.
On the error log of the account, There are not errors related, just some from yesterday when I was configuring and entered a wrong pass

Really the site is down… so not sure how to make it up again… maybe it is the solution…

It is solved, Here the solution just in case someone has the same issue.

I changed on app/config/local.php file and make empty the line:

‘trusted_host’ => array(

Thank you @EJL you almost has fixed, it was close!

1 Like

In Mautic, the /s/xxx URLs like /s/dashboard require authentication. ‘s’ stands for ‘secure’. URLs that can be accessed without authentication (i.e. public) do not have this /s prefix.

As far as your installation problem is concerned, I think the problem is with your rewrite rules. Mautic comes with a .htaccess file for Apache that defines these rewrite rules… make sure Apache is configured to allow reading configuration from .htaccess ( AllowOverride All directive)