Skip to content

Knowledgebase

Creating a subdomain website in cPanel

cpanel-whm, domains-dns

A subdomain such as blog.example.com gives a project its own hostname. It can serve a separate application, but it still needs a hosting configuration, public DNS and a certificate if visitors will use HTTPS.

Check access and requirements

Choose the parent domain and decide whether the new site should have separate files. For a staging site, prepare authentication or another access restriction before publishing copied content. A subdomain is not automatically private just because it is called staging.

01 Create a subdomain website in cPanel

  1. Open Domains > Create a New Domain and enter the complete subdomain name, for example blog.example.com.
  2. Clear the shared document-root option for an independent site and choose a distinct folder. Review the generated path before submitting.
  3. Create the domain and upload or install the application into its displayed document root. Keep its database separate from production if it is a test copy.
  4. Create the subdomain’s DNS record wherever the parent zone is authoritative. If DNS is external, a record in cPanel alone will not make it public.
  5. Issue or include the hostname in SSL and set the application’s URL to the new HTTPS address.

Confirm the expected result

Check the hostname from a browser and verify that it serves the intended content rather than the parent site. Test links, assets and any login or form.

Why does the subdomain fail to resolve or show the parent website?

If the subdomain does not resolve, inspect authoritative DNS and any conflicting A, AAAA or CNAME record. If it shows the parent website, compare document roots and application settings. Remove temporary test files after the site is working.

Sources and further reading

Was this answer helpful?

Need a little more help?

Our support team can help you find the next step.

Contact support