Imagine that you own a company or store site and, for example, bought a shared host site with PrestaShop content management system on them. Now you have decided that for better branding, the news magazine section Or blog, launch your site with a content management system like WordPress. Still, your main web host may only be suitable for hosting a store site like PrestaShop, and WordPress may not work best on them, which many of The big sites and brands do is launch a subdomain inside their main site host and then buy a WordPress host that is dedicated to hosting WordPress. That subdomain turns its website into a WordPress host from another server. They connect, then they can develop their WordPress site without any restrictions and without the need for their main site to be crowded and uncontrollable in the best possible way, without buying and using multiple domains with domain names. Be different, connect a subdomain or sub-domains. Connect their website to different hosts.
But before we start, we will explain the procedure of this tutorial to you a little.
We have a C-panel host with the domain mizbanfatv. Ir, which is for a Joomla site, and now we have decided to create a subdomain inside these hosts called mag.mizbanfatv.ir, which is supposed to be part of the news magazine of our website, and we want a subdomain Connect mag to another host whose control panel is Direct Admin, and launch a site with a WordPress content management system on this subdomain.
Before starting the steps, there is a very important point: when connecting a subdomain to another host, we must observe whether the domain name connected to our main host is mizbanfatv. Ir and I want to buy another host To connect it to our main host subdomain. When buying a second host, we must put the name of the main domain connected to the host mizbanfatv. ir, which can now be done in two different ways:
- The first way is to put the name of the main domain connected to the secondary host ir and then create a subdomain inside the secondary host called mag.mizbanfatv.ir and connect this subdomain to the primary subdomain of the host and place our WordPress site in the sub directory Install secondary hosting domains.
- The second way is to put the main domain name of mizbanfatv. ir at the very beginning of buying secondary hosting and connect the primary subdomain to the secondary hosting itself and install the WordPress content management system in the public_html path of the secondary hosting.
We follow the first method in this tutorial, if you do not fully understand what we mean by now, there is no need to worry, we will teach you all the steps in full, really note that the main host of our site is that host. Our domain has dns that point to those hosts, and in the main host, we have to apply settings that the subdomain points to another host, please continue with this practical tutorial.
Build a subdomain in Direct Admin hosting
First we enter the secondary host, ie the same WordPress host whose direct control panel is admin, and from the right side of the control panel at the bottom of the current domain, we must make sure that the main domain name connected to these hosts is mizbanfatv.ir and as you can see This is it, and now from your account section, click on the subdomain management tool.
Build a subdomain in the C-panel host
In the host C panel of our main website, from the right-side panel, i.e., general information from the primary domain section, we make sure that the main domain name of this web host is mizbanfatv—Ir, and as the character is the same.
Change the subdomain record in C Panel
Now when. We created the mag. mizbanfatv. Ir subdomain in C Panel, this subdomain is running from the same C Panel host by default, and now we want to make this subdomain connect to our admin direct host and run from there. To do this, we need to change the record of this subdomain created in the C Panel and connect it to one of them. To do this, we will g,o down again to reach the domain section and this time from here on the advanced zone editor tool. Click to enter it.