Create a subdomain on a HestiaCP VPS

Procédure

To create a subdomain on a VPS server equipped with HestiaCP, simply point your subdomain to the server's IP address in your DNS zone, then declare it as an independent web domain in the administration panel. HestiaCP is a lightweight, full-featured open source web hosting management panel, designed to easily manage your sites, databases, and email accounts on a Linux server. A subdomain corresponds to an extension of your main domain (for example hestia.learnlws.fr) allowing you to host a separate project or a dedicated application.

The steps

  1. Create the A record in the LWS DNS Zone

    Log in to your LWS customer area, go to the management section for your domain name, then open the section dedicated to the DNS zone. In the record creation form, choose the A type, enter the prefix of your subdomain (for example hestia), indicate your VPS IP address (for example the fictional address 203.0.113.10), then click Add.

    Create a subdomain on a HestiaCP VPS
  2. Access the web domain creation in HestiaCP

    Log in to your HestiaCP administration interface (generally accessible on port 8083 of your server) with your administrator account. In the top navigation menu, click on WEB, then select the Add Domain button.

    Create a subdomain on a HestiaCP VPS
  3. Declare the full subdomain

    In the Domain field, enter the full name of your subdomain (for example hestia.learnlws.fr). Leave the DNS or mail options unchecked if you already manage these services from your LWS area, then confirm your entry by clicking the Save button.

    Create a subdomain on a HestiaCP VPS
  4. Enable SSL security with Let's Encrypt

    From the list of your web domains, click on your new subdomain to open its configuration, then check the Enable SSL for this domain box. Then check Use Let's Encrypt to obtain an SSL certificate, enable automatic HTTPS redirection if you wish, then click Save.

    Create a subdomain on a HestiaCP VPS
  5. Customize advanced server options

    Scroll down the configuration page and expand the Advanced Options section. There you can adjust the web server template (APACHE2 web template or Nginx), the runtime version in PHP-FPM backend template, or define a custom root by checking Custom document root before saving.

    Create a subdomain on a HestiaCP VPS
  6. Check the subdomain availability

    Go back to the WEB section of HestiaCP to make sure the subdomain appears as active in the domain list. You can now open your subdomain in your web browser to confirm the default page generated by the server is displayed correctly.

    Create a subdomain on a HestiaCP VPS

Available settings in Advanced Options

HestiaCP makes it possible to adapt the technical environment of each subdomain separately.

  • APACHE2 web template — defines the Apache server execution and rewrite rules for your application.
  • PHP-FPM backend template — lets you select the PHP version and execution profile required by your scripts.
  • Proxy template — configures the behavior of the Nginx server placed in front for handling static requests.
  • Custom document root — redirects web requests to a specific subfolder (such as /public) often required by modern frameworks.
  • Additional FTP account(s) — allows you to restrict dedicated FTP access to the directory of this subdomain only.

Frequently asked questions

Why does the Let's Encrypt certificate generation fail in HestiaCP?

Let's Encrypt must query your subdomain to validate the certificate issuance. If the DNS A record has not yet propagated on the Internet or if it does not point to the exact IP of your VPS, certification will fail. Wait a few minutes then try again.

Where are my subdomain files stored on the VPS?

By default, HestiaCP isolates each website in its own directory tree. The public files of your subdomain are placed in the /home/admin/web//public_html/ directory.

Why does the browser display a "Site under installation" page?

HestiaCP automatically places a waiting index.html page in the public_html folder when a domain is created. You only need to upload your own files or remove this index to display your project.

How long does subdomain propagation take?

Creating a new DNS A record in your LWS area usually takes from a few minutes to a few hours to become visible across the entire global network.

What should I do after creating the subdomain on HestiaCP?

You can configure a dedicated FTP account from HestiaCP advanced options to upload your source code, create a database in the BDD section, or install a compatible web application.

Useful links

help.lws.net/a/7959
Was this article helpful?

Yes

No

Read 1 times

Thank you! Feel free to ask questions about our documentation if you would like more information, and help us improve it.

Similar articles

A question about this article?

Ask the LWS team and the community. Answers are published after moderation.

Ask the LWS team and its community a question

GDPR: Controller: LWS-Ligne Web Services. Purpose: moderation and public publication of your question, possible notification of an answer. Legal basis: consent (Art. 6(1)(a) GDPR). Email retention: 90 days after notification, 12 months maximum without an answer. To exercise your rights, see the GDPR section of our Terms and Conditions.