Trusted_domain-configuration not working

Steps to reproduce

  1. Access Owncloud via
  2. Get error “Domain is not trustworthy”, add domain to “owncloud/config/config.php”
  3. Access Owncloud via again

Expected behaviour

Domain should now be trustworthy

Actual behaviour

Domain is still not trustworthy

Server configuration

Operating system: Ubuntu 18_04 LTS Desktop

Web server: Apache2

Database: MySQL

PHP version: PHP 7.2

ownCloud version: 10.0.9

Updated from an older ownCloud or fresh install: Fresh and clean ;D

Where did you install ownCloud from: Official repositories

Signing status (ownCloud 9.0 and above):

The content of config/config.php:
‘trusted_domains’ =>
array (
0 => ‘’,
1 => ‘’,
2 => ‘localhost’,
3 => ‘$ip-address’,
4 => ‘’,

List of activated apps: LDAP

Are you using external storage, if yes which one: No

Are you using encryption: No

Are you using an external user-backend, if yes which one: LDAP -> ActiveDirectory

Client configuration

Browser: Google Chrome

Operating system: Android 8.0.0, Windows 10


So our domain is:, while our website is
The owncloud-server is and the cloud can be accessed nor problemo via “”, “”, “”, and “$ip-address”, as long as I’m using a PC that is in the domain-network.

When trying my phone, (or a notebook using a hotspot my phone delivers) I can’t access the cloud via the “”-adresses of course, as it is not in the domain. But when I’m trying the ""address, it gives me the error of the accessing domain not being trustworthy and I should add it into the trusted_domains.

(In our DNS “” points to “$ip-address”)

So how can I make the “” trusted? (Except by adding it to trusted_domains?)

Seems to me like a DNS issue if you have no issues accessing the site from your PC.

Also I am not sure if you can add a Variable in the array list.

I have no issues accessing it from inside the network, but it won’t work from outside the network.
It doesn’t matter which device I use…

Also I did not add a variable, it was just a placeholder. Could’ve used 123.456.78.90 or something instead.

I also just did a dns-lookup on a PC outside the network, and when I try “nslookup”, it gives me the correct IP.

Also I don’t get the little pop-up window when I click on the button to “add X to the trusted domains”.” does norhing but sending me into the settings…

Solved. It was some wrong config in the firewall…


Same exact problem but turning off the firewall did not fix it:
OwnCloud server 10.3.1
Added domains to trusted domains in config.php and owncloud web interface STILL claiming I’m accessing from an untrusted domain.
I’m out of ideas on this one. Owncloud 10.2 did work. Also, I can access Owncloud sever in localhost.
I have no idea what’s going on here!

try: 'overwritehost' => '',

Here you enter your server address.


Same problem.
Tried every posted suggestion and still not able to get past the “untrusted domain” message.
Here is the config page below. Installed by Softaculous. I am using a shared IP address. I have at one time or another added ‘localhost’ and the ip address but still the same “untrusted domain” message.

$CONFIG = array (
  'instanceid' => 'ocnax9hcltlm',
  'passwordsalt' => 'xxx',
 'secret' => 

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

  'datadirectory' => '/home/burlin19/ownclouddata',

  'overwrite.cli.url' => '',

  'dbtype' => 'mysql',

 'version' => '',

  'dbname' => 'xxx',

 'dbhost' => 'localhost',

 'dbtableprefix' => 'oc_',

 'dbuser' => 'xxx',
 'dbpassword' => 'xxx',
 'logtimezone' => 'UTC',
 'apps_paths' => 
 array (
    0 => 
    array (
      'path' => '/home/burlin19/public_html/BRHS_cloud/apps',
      'url' => '/apps',
      'writable' => false,
  1 => 
    array (
      'path' => '/home/burlin19/public_html/BRHS_cloud/apps-external',
      'url' => '/apps-external',
      'writable' => true,
  'installed' => true,

If anyone can offer a solution, please do.

Admin Edit: removed security relevant information; formatting

On shared hosting it makes no sense to add localhost or the IP address, as the Host-Header is used to route the request to your virtual host.

Perhaps test your ownCloud domain with a curl -I, perhaps there is a Location: header in the response which will forward you to a different domain. Alternatively open the dev-console in your browser, you should also be able to see redirects (and the final host header) there.

1 Like

same isssue tried every possible thing to get owncloud accesible in local network no luck , :frowning:

@Dinesh_Yadav your problem is completely different as @highland is using shared hosting, ergo publicly available, while you are talking about a local network. Perhaps open a new topic in the server category, where you can detail how you set up your ownCloud server in the post template.

1 Like

thanks! I will do that.