Go to page content

Using your registered domain

Before others can view your site you will need a domain name.

Contributed by: Andy W. Song


The first thing most everybody does after installation is creating your first site called 'blog'. And next? You want to publish your site to the world. How other people access your site, from a domain name such as http://blog.example.com:8000/, not just http://blog:8000/.

If you give this URL to friends it would be a joke.


Linux OS. Your Zotonic is installed, and your first site works. Let's assume it's called blog.  Your Zotonic server has a public IP and is configured to accept connections on port 8000.  You have registered a domain like example.com and have its DNS record pointing at your Zotonic server's public IP.


Go to the directory your Zotonic is installed, usually it's /home/zotonic/zotonic.

Edit file priv/sites/blog/config (replace blog with your site name). Find the line {hostname, "blog"} and change blog to whatever domain you choose.

Visit your site from another computer.

If you want http://blog.example.com/ instead of http://blog.example.com:8000/, then check out Running on Port 80 and 443 for instructions on using authbind to allow Zotonic to use privileged ports.


Ping your new domain name from another computer and make sure it points to your Zotonic server. If it isn't, then check your DNS or wait for the DNS change to propagate (it can take up to 24 hours) and try again.

This page is part of the Zotonic documentation, which is licensed under the Apache License 2.0.