Skip to content
Docs

User guide

Changing your domain

This explains how to change the domain of a live site. Zittme supports multiple domains, so instead of editing configuration files, you add a domain and change the default in the admin screen.

Assume you are moving from from.com to to.com.

1. Prepare to connect the new domain

Point to.com to your server in DNS, and add to.com to your web server (nginx server_name or an Apache virtual host). If you use HTTPS, issue a certificate for the new domain as well.

2. Before the change: on the old domain

In the from.com admin screen:

  1. In System settings > Site settings, use "Add new domain" to add to.com. Keep its settings the same as the existing domain.
  2. Change the "Handling of unregistered domains" option to Show main page. (This is a safety net so visitors are not bounced during the switch)
  3. 3. After the change: on the new domain

    Visit to.com and, in the admin screen:

    1. Set to.com as the default domain.
    2. Delete the from.com domain. (If you want visitors arriving at the old address to be sent to the new domain, keep it instead of deleting it. Visiting a domain that is not the default redirects to the default domain)
    3. Restore the "Handling of unregistered domains" option to its original value.
    4. If the domain already changed before you could prepare

      If you cannot access the admin screen, change the domain directly in the DB. (If you installed with a different table prefix, change the rx_ part accordingly)

      UPDATE rx_domains SET domain = 'to.com' WHERE domain = 'from.com';

      After running it, delete everything under the files/cache folder so the old domain info does not remain in the cache.

      Common problems

      • It keeps redirecting to the old domain: Try changing the unregistered_domain_action value to display in files/config/config.php.
      • Pages load resources from the old domain's address: Emptying files/cache fixes this.
      • You do not need to edit URLs in configuration files such as db.config.php directly. Domain info is managed in the DB (the domains table).