Scenario Overview
- Your main domain (e.g.,
example.org
) is used as a custom domain pointing to a WordPress Multisite on another domain (example.com
). - You want to add a subdomain (e.g.,
ok.example.org
) on the same server using CyberPanel, running a different CMS or site (not part of the WP multisite). - You want the subdomain to work properly without interfering with the WordPress multisite on the main domain.
Step 1: Understanding DNS & Cloudflare Setup
Since example.org
is already pointed to your WordPress Multisite (on example.com
), your DNS in Cloudflare likely has:
- An A record for
example.org
pointing to the server IP hosting WP multisite (example.com
) - Possibly proxy enabled (orange cloud)
You want to add a subdomain ok.example.org
pointing to your CyberPanel server where the new CMS/site will be hosted.
Step 2: Add Subdomain DNS Record in Cloudflare
- Log in to your Cloudflare dashboard for
example.org
. - Go to the DNS tab.
- Add a new A record:
- Name:
ok
- IPv4 address: IP address of your CyberPanel server where you will host the subdomain
- Proxy status: Initially, set to DNS only (gray cloud) to avoid proxy issues during setup.
- Save the record.
Note: If your main domain and subdomain point to the same server IP, just ensure the DNS records exist and are correctly set.
Step 3: Create the Subdomain Website in CyberPanel
- Login to your CyberPanel dashboard.
- Navigate to Websites > Create Website.
- Fill in the details:
- Domain Name:
ok.example.org
- Select PHP version, owner, and other options as required.
- Click Create Website.
This will set up the virtual host and document root for ok.example.org
.
Step 4: Upload or Set Up Your Different CMS for the Subdomain
- Upload your PHP CMS or site files to:
/home/ok.example.org/public_html/
- Make sure the permissions and ownership are correct.
- Configure your CMS database and settings accordingly.
Step 5: Test the Subdomain Before Enabling Proxy
- Wait a few minutes for DNS propagation.
- Visit
http://ok.example.org
in your browser. - If the site loads properly, the server setup is working.
Step 6: Enable Cloudflare Proxy (Optional)
Once everything is verified and working:
- Return to Cloudflare DNS.
- Change the
ok
subdomain A record’s proxy status to Proxied (orange cloud). - Cloudflare will handle SSL, caching, and security features for the subdomain.
Additional Tips and Considerations
- SSL Certificates: Use CyberPanel’s Let’s Encrypt SSL to issue SSL for
ok.example.org
. - Avoid Conflicts: Since the main domain (
example.org
) is a custom domain for WP multisite on another server, your subdomain DNS must point specifically to your CyberPanel server IP. - DNS Propagation: Sometimes DNS changes take time. You can flush DNS cache or use online tools to check propagation.
- Avoid Proxy during setup: Proxying (orange cloud) might cause issues with initial setup; start with DNS only.
- Firewall & Ports: Make sure your CyberPanel server firewall allows HTTP/HTTPS traffic.
Summary Table
Step | Action |
---|---|
Cloudflare DNS | Add A record for subdomain ok.example.org pointing to CyberPanel server IP; start with DNS only |
CyberPanel | Create website for ok.example.org |
Upload CMS | Upload files to /home/ok.example.org/public_html |
Test | Visit http://ok.example.org to confirm working |
Cloudflare Proxy | Enable proxy (orange cloud) once confirmed |
SSL | Issue Let’s Encrypt SSL via CyberPanel for ok.example.org |