How to create a custom URL for your web app?

In your Siberian, from the 3.1 version minimum, you can enter a custom domain for an app in Settings > Domain, or from your backoffice in the app sheet you can access from Manage > Application.

Be careful this operation may have an impact on your app if it is already published, therefore do it only if you really want a custom url for your mobile website (i.e. allowing people to open the HTML5 version of your app in their browser).

Create a CNAME record

The best method on Siberian is to use a CNAME record. If your Siberian is installed at siberian.yourdomain.com, and you have, or your client has, a domain like clientdomain.com, it is possible to create a CNAME like mobile.clientdomain.com that will open the app in the browser of the device.

To create the CNAME you must, or your client must, connect to his domain name panel and create a CNAME record named “mobile” which will have your Siberian URL as its destination. Thus to keep the example above, the destination of the CNAME “mobile” will be “siberian.yourdomain.com”. In the domain name panel, a CNAME record can be created from the DNS zone section (most often from a link “Add a new record”).

Then the complete CNAME must be entered in the domain field in your Siberian editor (Settings > Domain) or in your Siberian backoffice (Manage > Application > “Domain” field).

If it is not well configured, a message saying “your CNAME is not properly set” will be displayed. It can happen even if you have well configured your CNAME because of DNS propagation delay. Wait a little bit and enter the CNAME url in your browser, if it displays the app, the CNAME is well configured. If not, you should take a look at your CNAME configuration, or remove this custom domain.

If you want to be sure your CNAME is properly set, just check your CNAME record with this tool:

https://www.whatsmydns.net
Enter the chosen URL of your mobile version, in our example mobile.clientdomain.com, then choose CNAME, and click “search”, if it doesn’t show the address of your Siberian as the result, that means you haven’t well created your CNAME or you are not creating its CNAME at the right place (your domain name may be managed by another panel).

WARNING: if your client, or you, have entered a custom domain for your app, be sure this custom domain works. If not, the app will never open, because the content is based on this URL and it will try to reach this URL and it will fail.

Server settings

If you want your users to use this menu, you must first make some settings on your server. If, when creating a CNAME, you are redirected to another page than your Siberian, that means you have to do the following settings in your server configuration. This happens because your platform is not the default website of your server.

For Plesk users

If you see the default page of Parallel Plesk when entering the CNAME in your browser, do the following:

  1. Connect to your Plesk panel
  2. Click on the “Server” tab
  3. In “Tools & Resources” click on IP Adresses
  4. Click the IP of your server (the IPV4 one, not the IPV6 if you have IPV6)
  5. For “Default site” choose your platform, and save
  6. Enter the CNAME in your browser and that should be ok.

For cPanel users

(note that the process below will require you have a dedicated server or a VPS, with root access)

If you see the “Sorry” page of cPanel when entering the CNAME in your browser, do the following:

  1. Connect in SSH to your server
  2. Find the httpd.conf file of apache (if you have cPanel installed, most of the time this file is in /usr/local/apache/conf/)
  3. Edit this file
  4. Go down and find the entry related to your platform. It begins with <VirtualHost xx.xx.xx.xx:80> and the ServerName is the address of your platform. Copy all this entry beginning by <VirtualHost xx.xx.xx.xx:80> and ending by </VirtualHost>, paste it in a text editor
  5. Connect to your WHM panel
  6. In the left menu, click on “Service configuration” > “Apache configuration” > “Include Editor
  7. In the “Pre VirtualHost Include” part, select “All versions
  8. Past the entry you just pasted in your text editor then click on the “Update” button
  9. Finally, click on the “Restart Apache” button and wait until the Apache server has restarted.

If you don't have a Hosting Panel

(note that the process below will require you have a dedicated server or a VPS, with root access)

WARNING: If you are not confident with configuration files, contact us in a bug ticket and send us your ssh root access.

You have to change the vhost configuration file on your server. You have to do the following:

  1. Connect in SSH to your server
  2. Find the httpd.conf file of apache (if you have cPanel installed, most of the time this file is in /usr/local/apache/conf/)
  3. Edit this file
  4. Go down in the file to find the first entry which matches the webspace in which your platform is installed. For instance you can have your platform and other websites installed in /home/www/mywebspace/, with your platform installed in /home/www/mywebspace/platform (these are exemples)
  5. The first entry which matches your webspace should be another website (actually it should be the one on which you are landing when entering your CNAME in your browser). This entry begins by <VirtualHost xx.xx.xx.xx:80> where “xx.xx.xx.xx” is the IP of your server, and it ends with </VirtualHost>. Below <VirtualHost xx.xx.xx.xx:80> you will see the ServerName which match the address of your default website
  6. Go down and now find the entry related to your platform. It also begins with <VirtualHost xx.xx.xx.xx:80> but the ServerName is the address of your platform. Copy all this entry beginning by <VirtualHost xx.xx.xx.xx:80> and ending by </VirtualHost>, paste it in a text editor
  7. Go back to your SSH console, and comment all the lines related to this entry (the entry for your platform) by adding a # before each line (<VirtualHost xx.xx.xx.xx:80> and </VirtualHost> included)
  8. Go up in the file to the first entry of your webspace, the one we have seen on point 5, above <VirtualHost xx.xx.xx.xx:80> of this entry paste the entry of your platform (the one you have pasted in a text editor)
  9. Save and exit
  10. Finally, restart apache by typing (depending on your server):
    • service httpd restart
    • service apache restart
    • service apache2 restart
    • apachectl -k restart

Note: If you can’t see it working in your web browser, that means you have cache in it. Flush your web browser’s cache or try with another web browser.

Was this article helpful?

Related Articles