Create subdomain website with documentroot at /home/subdomain.domain.tld/public_html

I started using cyberpanel only one day ago, and I would like to ask if cyberpanel allows me to create a subdomain with a path that is independent from the main domain? For example, if the main domain is domain.tld and the path is /home/domain.tld/public_html, I want to create a subdomain.domain.tld so that its path is /home/subdomain.domain.tld/public_html instead of /home/domain.tld/public_html/subdomain.domain.tld/public_html. I would have created the subdomain directly by creating website, but that would have given visitors a 404 error page. How should I fix it?

Thanks.

Hi @Cipio ,
Yes, it is possible.
Just create a website from the left-side menu you see in CyberPanel.

Thank you!

@engrrajonahmed

Hello.

Thank you for your reply. However, I will see the Litespeed web server configuration success page after I type my subdomain, if I create subdomain through creating websites. How can I fix this problem? Thank you very much.

@Cipio Point the subdomain to your IPv4 and IPv6(if any) by adding a A & AAAA records for the subdomain. Add a CNAME record(e.g.: www.subdomain.domain.tld) too.

Thank you!

Post a screenshot here…

A records and CNAME records are all exsiting. But I am using Cloudflare proxy. Will it effect my subdomain visiting?

Disable the proxy then try!

Got it. I will first disable the proxy.

Hello. This is the 404 error screenshot. Disabling Cloudflare doesn’t work

Well, your information confused me.

Here are the steps,

  1. Create A, AAAA, and CNAME records in your DNS provider.
  2. Now wait for at least 15 minutes.
  3. Now create a website in CyberPanel. During the website creation process check DKIM Support and open_basedir Protection. Leave SSL and Mail Domain. [Include Mail Domain if you want to create mail accounts under this sub-domain].
  4. Now go to List Websites and click on Manage.
  5. Now to public_html using File Manager and upload a index.html file.
  6. Done!

This topic was automatically closed 3 hours after the last reply. New replies are no longer allowed.