How to create a Subdomain in DirectAdmin

To create a subdomain in DirectAdmin, follow these steps: 

Log in to DirectAdmin

  • Open your web browser and navigate to your DirectAdmin login page, which will typically be a URL similar to https://yourdomain.com:2222. Alternatively, you can login through your Client Control Panel. 
  • Enter your username and password, then click "Login." 

w8hKyg8R8oHeQAAAABJRU5ErkJggg== 

 

Navigate to the Subdomain Section 

  • From the main dashboard, locate the "Account Manager" section. 
  • Click on "Subdomain Management." 

 

6YalkUEvFvsAAAAAElFTkSuQmCC 

 

Add a New Subdomain 

  • Click the "Add Subdomain" button. 

 

Q7oqOsFhnHQAAAABJRU5ErkJggg== 

 

Enter Subdomain Details 

  • Subdomain Name: Enter the name of your subdomain (for example, if you want "blog.yourdomain.com," type "blog"). 

 

 

NZeSbdlRpjjDHGGGOMMSa51ffeLwh46HIipS7hDnQ75HugHtmdWMEbY4wxxhhjjDHJzX61TiwFPES5xDnTFVkVsHV2JJbuxhhjjDHGGGNMsdn8H5ksIOa7WB2qAAAAAElFTkSuQmCC 

 

In DirectAdmin, when creating a subdomain, you can choose from three options for the document root location: Default, Legacy, and Custom. Here's a brief description of each: 

  • Default: 
    • The subdomain’s document root is automatically created under

/domains/example.com/public_html/subdomain/. 

 

    • This is the recommended option as it keeps the subdomain's files organized in a directory structure separate from the main domain. 

 

  • Legacy: 
    • The document root for the subdomain will be created directly under the public_html/ directory as

/domains/example.com/public_html/subdomain_name. 

 

    • This is an older method and places the subdomain’s files alongside the main domain's files, which could lead to a less organized structure. 

 

  • Custom: 
    • This allows you to manually specify the document root location for the subdomain. 
    • Useful if you need more control or want to store the subdomain files in a specific directory that is different from the default or legacy locations. 

 

These options help you control where your subdomain's files are stored based on your organizational needs. 

 

Click "Create" 

  • After entering the subdomain name, click "Create" to complete the process. 

 

wNZ7rHp729nXwAAAABJRU5ErkJggg==wAAAABJRU5ErkJggg== 

 

When you change the PHP version for a subdomain in DirectAdmin, the change is specific to the subdomain and will not affect the main domain. Each subdomain can have its own PHP version, independent of the main domain or other subdomains. This is useful if your subdomain requires a different PHP version for compatibility with certain applications or scripts, while allowing the main domain to continue running on its current PHP version. 

 

Verify the Subdomain 

  • After creation, the new subdomain will appear in your subdomain management list. 
  • You can now manage files for the subdomain in its designated directory, usually found in the public_html folder as public_html/subdomain_name. 

 

xCLAa1jCFgAAAABJRU5ErkJggg== 

   

Setting Up DNS Records 

  • Once you have created your subdomain, it will also need to resolve to the server's IP address, just like your main domain. To achieve this, you will need to create an A record and a www Cname record for your subdomain. Please log in to your dashboard at axxess.co.za. Once logged in, navigate to the domain in question, then click "view" and look for your DNS zone. Please note that, after this has been the record you have recently added needs to propagate which will take about 4 hours.

ALK2FZgBwvqGAAAAAElFTkSuQmCC

 

This is how you can create a subdomain in DirectAdmin.

 

© 1997 - 2024 Axxess DSL (Pty) Ltd. All rights reserved.