Owncloud shows IP Address instead of domain

Posted February 19, 2015 9.2k views

I have a Ubuntu droplet with owncloud on it, I got a domain name from Gandi, set everything up according to the tutorials here (DNS, records). I can access my server using the domain name but when I do it, it redirects to the IP address. How can I fix that?

  • @wuher

    What does your current DNS configuration look like at Gandi? Feel free to sub your domain with something such as MYDOMAIN.COM if you’d rather not publish it on an open forum, just make sure you include all applicable records (A, CNAME, TXT etc).

    In many cases, DNS could be the issue, in others, it could be a server configuration issue. Have you modified any of the server configuration files since deploying the One-Click App?

  • I haven’t touched any files on the server.

    My DNS records:

    A: @
    A: test
    CNAME: www

  • are you using as an example, or is that actually what you have in your A record? If so, then you should find the ip address of your droplet and use that instead…should be next to your droplet info in DO panel

  • Yeah I put it as an example, my actual records have the real IP address. I might be a retarded in terms of running a server, but fortunately I’m not that stupid.

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
2 answers

I am looking at my owncloud install under /config/config.php and there is a part with the domain:

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

You might try adding your domain to that array, or if that section does not exist, add it

In order to use your own domain with the site, you will need to update your Apache configuration. Edit both /etc/apache2/sites-available/owncloud-ssl.conf and /etc/apache2/sites-available/000-owncloud.conf and replace the line:




Next, you should edit the trusted_domains entry in you ownCloud configuration. This is located in/var/www/owncloud/config/config.php`“

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

You will need to restart Apache in order for the changes to take affect:

sudo service apache2 restart