Connection to your Matomo dashboard could not be established (Error 500)

I’m having trouble connecting Mainwp to matomo dashboard. I contacted support at my hosting manager (runcloud), said no issue on server level, no error in the logs. But I get “Connection to your Matomo dashboard could not be established(Error 500)” when trying to connect,I tried deleting and making new api token. I whitelisted mainwp and ip on cloudflare, tried disabling proxy. Nothing works.

Hey @Nycwill

Welcome to the MainWP community!

Thanks for making the screen recording for us. However, since it contains private information including the API key, I’ve hidden it from the post.

Based on that recording, you are actually getting Error 401 Unauthorized and not 500, which indicates that a security rule present on the Matomo site is blocking the connection.

Can you check with the host support if they are seeing any blocked requests from the Dashboard site in the firewall or any server-side security software they may be running?

Also, since the MainWP Dashboard and the Matomo site are on the same server, have them check if the loopback connections are working properly.
You can check in the System Report (your-mainwp-dashboard.com/wp-admin/admin.php?page=ServerInformation), under Server self connect to see if you are seeing any warnings or errors.

API since been changed, so i didn’t bother to mask it. :slight_smile:

There was a 500 error then it turn to 401 error. Runcloud checked the firewall and help with disabling it, nothing is blocking, they said nothing is blocking it.

No errors or warning in Server self connect

I also tried to connect with Matomo cloud, and spin up wordpress with zipwp and tried connecting, it still gave me 401 error.

Thanks for the additional details, @Nycwill.

In our test Dashboards, the connection from the Matomo extension is being established without issue with the Matomo Dashboard.

Would you mind opening a private Help Desk ticket so we can collect some additional information & investigate further?

And please refer to this Managers thread by its URL in the ticket.