To configure a CyberPanel instance for a hosted subdomain, create email addresses, and enable whole domain access, you must first ensure DNS records are correctly propagated. The process involves creating the primary website in the dashboard, adding the specific subdomain entry, generating mail accounts via the Email section, and verifying that DNS zones allow wildcard or specific A/AAAA records for full domain coverage.
Prerequisites and DNS Verification
Before diving into the CyberPanel interface, it is critical to have your domain's nameservers pointing to your hosting provider or a managed DNS service like Cloudflare. If you are using a VPS with Docker, as discussed in
Setting up Nginx Traffic Redirect for Subdomains on VPS with Multiple Docker Containers and Cloudflare, ensure that your container network allows incoming traffic on ports 80 and 443.
Verify that your domain has an "A" record pointing to your server's IP address. For the subdomain (e.g., admin.example.com), you need a separate "A" record or a wildcard "*" record if you plan to host multiple subdomains. Without these DNS entries, CyberPanel can create the virtual hosts, but visitors will receive connection errors because the domain name cannot resolve to your server's IP.
Creating the Main Website and Subdomain
Log in to your CyberPanel administrator panel. Navigate to the
Website menu on the left sidebar and select
Create Website. This step establishes the root domain (example.com) and its associated web directory. Fill in the required details:
- Domain Name: Enter your primary domain.
- Owner: Select the user account that will own this site.
- Email Address: Provide an admin email for SSL certificate notifications.
- Website Packages: Choose a package that defines disk space and bandwidth limits.
Once the main site is created, do not close the window. Look for the option to add additional domains or subdomains within the same creation flow, or go back to the
Manage Websites list. Click on your newly created website to manage it. In the management view, locate the
Add Additional Domain or
Add Subdomain button.
Enter the subdomain name (e.g., admin). CyberPanel will automatically append the base domain. Ensure that the document root is set to a new directory (e.g., /home/example.com/public_html/admin) to keep files organized. If you need SSL, check the box to issue a Let's Encrypt certificate immediately. This ensures HTTPS is active for both the main domain and the subdomain from the start.
Configuring Email Addresses
CyberPanel uses Dovecot and Postfix for mail services. To create email addresses, navigate to the
Email menu in the main dashboard. You will see options to create email accounts for existing websites. Select the primary domain (example.com) from the dropdown.
Click on
Create Email Account. You will be prompted to enter:
- Email Address: The local part (e.g., info, support, admin).
- Password: A strong password for the account.
- Quota: Set a mailbox size limit in MB or GB.
Repeat this process for any other required addresses. After creation, verify that the MX records for your domain are pointing to your server. CyberPanel usually handles this automatically when you create the website, but it is good practice to check the DNS zone editor. The MX record should point to mail.example.com or just example.com, depending on your configuration.
Enabling Whole Domain Access
Whole domain access typically refers to ensuring that all variations of the domain (www, non-www, and subdomains) are accessible and properly routed. In CyberPanel, this is largely handled by the Nginx configuration generated during website creation. However, if you encounter issues where only one variant works, you may need to adjust redirections.
Navigate to
Manage Websites and click on your site. Look for the
Nginx Configuration or
SSL Settings. Ensure that the "Redirect to HTTPS" option is enabled if you want secure connections. For whole domain access, verify that the DNS zone includes a CNAME record for "www" pointing to the apex domain, or an "A" record if you prefer direct resolution.
If you are dealing with complex routing, such as pointing a subdomain to a specific port, refer to guides on
Pointing Subdomain DNS Record to Specific Port on Ubuntu VPS Server. In standard CyberPanel setups, simply ensuring that the subdomain's A record exists and the Nginx vhost file contains the correct server_name directive will grant access. The system automatically generates the necessary server blocks for each added domain and subdomain.
Troubleshooting Common Issues
If the subdomain does not load, clear your browser cache and check the DNS propagation status using tools like dig or nslookup. Ensure that the firewall on your server allows HTTP (80) and HTTPS (443) traffic. In some cases, SELinux policies on CentOS-based systems might block access; however, CyberPanel's installation script usually configures these rules correctly.
For email issues, check the mail logs located in /var/log/maillog. If emails are not sending, verify that the SMTP port 587 is open and that the authentication settings in your email client match the credentials created in CyberPanel.
Frequently Asked Questions
Can I use the same email account for multiple subdomains?
No, email addresses are tied to specific domain zones. An email address like
[email protected] belongs to the example.com zone. You cannot use it for admin.example.com unless you alias it, which requires manual postfix configuration outside the standard CyberPanel UI.
Why is my subdomain showing a default page instead of my content?
This usually happens if the document root is not correctly set or if the DNS A record is missing. Verify that the subdomain's A record points to your server IP and that the Nginx configuration for that subdomain specifies the correct web directory path.
How do I reset the password for a CyberPanel email account?
You can reset the password directly from the CyberPanel dashboard by navigating to the Email section, selecting the account, and clicking the edit or reset password option. There is no need to access the server command line for standard password resets.
Does CyberPanel support wildcard SSL certificates?
Yes, CyberPanel supports Let's Encrypt wildcard certificates. When creating a website or adding a subdomain, you can request a wildcard certificate (*.example.com) which will cover all current and future subdomains under that domain, simplifying SSL management.
What happens if I delete a subdomain in CyberPanel?
Deleting a subdomain removes its Nginx configuration, database (if attached), and file contents. It does not automatically delete the DNS record. You must manually remove the corresponding A or CNAME record from your DNS provider to fully clean up the setup.