Trusted Hostname

I have an issue I hope somebody can help me with.

I have installed piwik on a subdomain - my trusted host is - my emails won’t send.

I change toe trusted hosts to - emails won’t send.

I change toe trusted hosts to - emails send BUT I have a yellow error warning box stating the following;

Warning: You are now accessing Piwik from, but Piwik has been configured to run at this address: 
Piwik may be misconfigured (for example, if Piwik was recently moved to a new server or URL). You can either click here and add as the valid Piwik hostname (if you trust it), or 
click here and go to to access Piwik safely. 

How do I fix this problem and how do I login again?
The Piwik Super User can manually edit the file piwik/config/config.ini.php and add the following lines:
trusted_hosts[] = ""
After making the change, you will be able to login again.
You may also disable this security feature (not recommended). To do so edit config/config.ini.php and add:

I have followed all the steps above to no avail.

PLEASE help with this one.




I had a similar problem. I solved this adding multiple hostnames like this:

trusted_hosts[] = "subdomain1.domain.tld"
trusted_hosts[] = "subdomain2.domain.tld"

This has allowed me to have several valid domains working with piwik and no warning.

Hope this helps.