Owncloud – You are accessing the server from an untrusted domain

Suddenly ownCloud gives me an error “You are accessing the server from an untrusted domain. Please contact your administrator”. When you go to the webpage and when I click on the “add as truted domain” it gives me a timeout error.

My ISP provided me with a dynamic IP address, in my case the WAN IP address changed. ownCloud remembers the IP address or host name originally used. To fix this error you need to replace the old IP address used with a new one or add an additional IP addresses or domains.

Solution

I am running ownCloud instance from Ubuntu 14.04. Access Terminal enter the following command:

gksu gedit /var/www/owncloud/config/config.php

you can also use the following command:

nano /usr/share/owncloud/config/config.php

You-are-accessing-the-server-from-an-untrusted-domain-2

We can edit the the config.php to replace the IP address or domain name to include your domain. Locate the section “trusted domains“, change the IP address or domain name to your new domain. It may look similar to this:

'trusted_domains' =>
 array (
 0 => '73.138.252.62',
 ),

You can change it to include your new IP address by changing the IP value or you can add additional addresses. For example:

'trusted_domains' =>
 array (
 0 => '73.138.252.62','servername.example.com',
 ),

also change the url’ => http to the new IP address or domain name.

You-are-accessing-the-server-from-an-untrusted-domain-1

Then save your changes. If you used the nano command press Ctrl+o and then press enter to accept the name of the file. Press Ctrl+x to exit nano and re-test access.

Video Tutorial:

Leave a Reply