Bloxby Support Portal
  • Home
  • Knowledge Base
  • Forums
  • Register
  • Live Chat

Knowledge Base

  1. Home
  2. Knowledge Base
  3. Developer Manual
  4. How to configure DNS for custom domain publishing

How to configure DNS for custom domain publishing

  • Created September 3, 2017
  • Author Herbert
  • Category Developer Manual
  • Comments 3

If you want to allow your end-users to publish their site(s) using their own domain names, like yourdomain.com, you will need to complete the following steps:

  1. Configure local DNS on the server hosting your copy of Bloxby. You will need to instruct your server to direct requests for the custom domain to the folder on the server containing your Bloxby code
  2. Create a DNS record for the custom domain which points to your Bloxby server. This needs to be completed at the main nameserver for the custom domain (typically, this is a step your end-users will need to complete themselves, as it requires access to the domain’s DNS records).

1. Configure local DNS on Bloxby server

If you’re looking to offer custom domain publishing to your end-users, we advice to use a server or VPS without cPanel. When using cPanel, it’s not possible to implement a single solution which would cover all custom domains used by your users. Instead, you would need to add every single individual custom domain manually to your cPanel.

Using a server or VPS without cPanel allows for a single configuration, which only needs to be applied once. This solution would then work for each and every custom domain connected to your Bloxby application by your end-users.

Bellow we are describe the process for Debian based (Debian, Ubuntu etc.) Linux distributions and RedHat based (RedHat, CentOS etc.) Linux distributions:

a. Debian based (Debian, Ubuntu )

  1. Create a file named ‘custom.conf’ in /etc/apache2/sites-available/custom.conf and add the following content:

    <VirtualHost *:80>
    ServerAdmin [email protected]
    DocumentRoot /var/www/html
    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined
    </VirtualHost>

  2. Now activate the new configuration file with the following command:

    sudo a2ensite /etc/apache2/sites-available/custom.conf

b. RedHat based (RedHat, CentOS)

Create the following directories if they don’t currently exist:

sudo mkdir /etc/httpd/sites-available
sudo mkdir /etc/httpd/sites-enabled

Next, we should tell Apache to look for virtual hosts in the sites-enabled directory, edit the Apache configuration file with following command:

sudo nano /etc/httpd/conf/httpd.conf

Add the following line to the end of the file:

IncludeOptional sites-enabled/*.conf

Save and close (Ctrl + X) the file when you are done. We are now ready to create our virtual host file.

Create new virtual host file with the following command:

sudo nano /etc/httpd/sites-available/custom.conf

Finally, we’ll finish up by pointing to the root directory of our bloxby installation directory (we assure its /var/www ). We will also tell Apache where to store error and request logs for this particular site:

<VirtualHost *:80>
DocumentRoot /var/www
ErrorLog /var/www/error.log
CustomLog /var/www/requests.log combined
</VirtualHost>

When you are finished writing out these items, you can save and close the file.

Now enable that virtual host with following command,

sudo ln -s /etc/httpd/sites-available/custom.conf /etc/httpd/sites-enabled/custom.conf
When you are finished, restart Apache to make these changes take effect by following command,

sudo apachectl restart

c. cPanel based hosting

As explained before, using cPanel in combination with custom domain publishing means you will need to maunally add each and every custom domain used by your end-users. You can do so by the following these steps:

  1. Login to your cPanel
  2. Go to “Aliases” from “Domains” section.
  3. Add the custom domain name and click the button labeled “Add Domain”.

2. Create DNS record for custom domain

Note: this step needs to be completed by the end-user, as it requires access the custom domain’s DNS records.

Using cPanel

Login to your cPanel and Click over Zone Editor and Add an A Record with Name * and address as your Server IP.

Using the domain registrar’s DNS

Log into your account with your domain registrar (the organization from which you purchased the domain) and locate the DNS administration area. Create a new DNS “A” record, set its value to “” (keep it blank) and point the new record to the IP address of your Bloxby server. If you do not know what the IP address of your Bloxby server is, you can use a tool like this one to figure out the correct IP address.

Was this article helpful?

Yes No

Related Articles

  • Update from v1.3.1 to v1.4.0
    • 0
    • 981
  • Update from v1.3.0 to v1.3.1
    • 0
    • 842
    • 1
  • Update from v1.2.3 to v1.3.0
    • 1
    • 795
  • Update from v1.2.0 to v1.2.3
    • 0
    • 1020
  • Update from v1.1.4 to v1.2.0
    • 1
    • 1043
  • Automated login
    • 0
    • 1703
    • 1

3 Comments

  1. Avatar [email protected]
    6 years ago

    Step 2 tells the user to point their A records to the server IP. However in the software it tells the user to point the A records to the website address (www.site.com). Also, when trying to publish a custom domain, it asks for ftp details (even if turned off in the package). This isn’t mentioned in this article.

    Log in to Reply
  2. Andrew Andrew
    6 years ago

    Hi Ben,
    I can understand how that might be confusing. However, a DNS A record must be pointed to an IP address (it can not be pointed to a domain name).

    We will be setting up a new support portal, including an updated knowledge base soon. During the move, we will be giving some much needed love and attention the knowledge base and patch it up where needed.

    Log in to Reply
  3. Avatar Niklas
    6 years ago

    Im running cpanel on my server. Is it not easier to let the user point the custom domain to our nameservers instead of creating an A-record? If the also use our nameservers the automatically got SSL-certification.

    Is this possible? And maybe easier than your suggestion above?… If the customer use our nameservers, what should I do next to connect the users website etc.

    Log in to Reply

Leave A Comment? Cancel Reply

You must be logged in to post a comment.

Knowledge Base Categories

  • User Manual
  • General
    • Frequently Asked Questions
  • Developer Manual
    • Updates
    • Integration
    • Extending Bloxby
  • Admin Manual
    • Managing Blocks & Components

Popular Articles

  • Server Requirements
  • Installation Guide
  • How to modify or develop Bloxby
  • Terms and Definitions
  • How to configure Bloxby page builder

Knowledge Base Authors

  • Andrew Ozols
    Andrew Ozols
    Articles Authored: 138
  • Herbert
    Herbert
    Articles Authored: 4

Knowledge Base Authors

  • Andrew Ozols
    Andrew Ozols
    Articles Authored: 138
  • Herbert
    Herbert
    Articles Authored: 4

Forum Statistics

Forums
11
Topics
1,083
Replies
6,210
Topic Tags
249
© Bloxby 2019, All rights reserved