Hosting & Domaining Forum

Hosting Discussion => Hosting Software and Control Panels => Hosting Software & CPs Related Offers & Requests => Topic started by: junad1020 on Jan 02, 2024, 12:30 AM

Title: Adjusting WHMCS to Allow Subdomains in Existing Domain Option
Post by: junad1020 on Jan 02, 2024, 12:30 AM
Greetings WHMCS team,

I am interested in selling hosting services and would like to have it activated on a subdomain. However, when I choose the option "I will use my existing domain and update my nameservers," and enter the subdomain (e.g., crop-report.peru.com), I receive an error message stating "The domain you entered is not valid."

Could you please advise me on how to ensure that, only when selecting the "I will use my existing domain and update my nameservers" option, the system allows the entry of a subdomain without validation?

Thank you.
Title: Re: Adjusting WHMCS to Allow Subdomains in Existing Domain Option
Post by: mariajones on Jan 02, 2024, 02:02 AM
When encountering an error message stating "The domain you entered is not valid" after attempting to enter a subdomain while selecting the "I will use my existing domain and update my nameservers" option, it can be frustrating for users who want to utilize subdomains for their hosting services.
In order to ensure that the system allows the entry of a subdomain without validation only when selecting the "I will use my existing domain and update my nameservers" option, we need to make adjustments to the validation process in the hosting platform's settings.

Firstly, we need to identify the specific section of the hosting platform where the domain and subdomain management occurs. This could be within the DNS settings, domain management, or account setup area.

Once located, we should review the validation rules currently in place. These rules likely include format checks to ensure the entered domain is in a valid format. However, when choosing to use an existing domain and update nameservers, the system should allow for greater flexibility in accepting subdomains.

Therefore, we can modify the validation process to distinguish between the two scenarios: registering a new domain and using an existing domain with a subdomain. For the latter case, we can implement a conditional validation check that bypasses strict domain format validation when the user explicitly selects the option to use an existing domain and update nameservers.

By updating the validation logic in this manner, we can ensure that users are able to enter subdomains without encountering the "The domain you entered is not valid" error message when they have selected the appropriate hosting option.