You are here:Home»KB»Web Design»CMS»WHMCS»Configuring Free domains on WHMCS
Monday, 31 August 2015 16:16

Configuring Free domains on WHMCS

Written by

When using WHMCS i have found that configuring the software to handle free domains can be confusing especially when you do not know what all of the setting do. In this article i will go through the various settings that can affect free domains and then i will give the ideal setup.

All the following answers are from WHMCS staff members through the support system.

Settings

CRON Jobs

There are 2 CRON that need to be considered.

  1. The basic CRON that WHMCS uses to send out invoices, emails, suspensions, teminations and other functions. This must be setup for WHMCS to run properly. (Setup/Automation). DO NOT enable auto termination unless you really know what you are doing. If enables, untick that box.
  2. The domainsync.php CRON job allows you to poll your registrar's API to automatically sync all of your domain expiry dates.
    1. http://docs.whmcs.com/Domains_Tab#Domain_Sync_Enabled - explains about this CRON job and gives the settings
    2. your registrar needs to support this and be enabled correctly in the WHMCS settings. (Setup/"Products/Services"/Domain Registrars)

Auto Renew on Payment

Automatically renew domains which are set to a supported registrar when they are paid for.

This allows automation of the domains (does not mean that the hosting service will go off, but the client not paying and the domain could get lost). It means the ouness is on the customer and me checking every other date to see if i need to renew.

Auto Renew Requires Product

http://docs.whmcs.com/Domains_Tab#Auto_Renew_Requires_Product

Only auto renew free domains that have a corresponding active product/service for the same domain

  1. This option purely gets WHMCS to do a Boolean check to see if there is an active product/service for this domain when processing a domain for a renewal. Dates are ignored.
  2. If there is no active product/service for this domain an email is sent out to the WHMCS admin with a "Free Domain Renewal Manual Action Required" error message so that the admin can manually go to WHMCS and renew the domain (an accept/approve link in the email would be easier and a nice feature). Dates are ignored.
  3. As a small followup, if the domain and service renewal dates match, an auto renewal would not occur until the customer had paid and "Auto Renew on Payment" was turned on.

These answers are confirmed by a WHMCS staff member

Domain Sync Enabled

Tick this box to enable automated domain syncing with supported registrars via cron

When this option is enabled WHMCS will poll your registrar for expiration dates for all of your domains and then update the records in WHMCS to match. This prevents errors happening from human error

Sync Next Due Date

  • Enable
  • Number of Days to Set Due Date in Advance of Expiry: XX

This option allows you to set the billing due date for the domain to match the expiration date of the domain. You also have the ability to set the billing due date XX number of days before the domain expiry. This can possibly be useful for customer so they dont forget to renew their domain but can cause other issues.

Questions

Free Domains and Preventing Auto Renewal

Scenario

I currently have annual hosting services with free domains packages on my whmcs. Some of these accounts have domains that expire years in the future so when the hosting service is renewed they do no need their free domains renewed at a cost to me that i do not need to pay for.

Is it possible to set a hosting package with a free domain that will only renew that domain at hosting renewal if that the doamin expiry is less than 1 year (or xxx years).

Question
This is for a domain transferring in with extra years (lets say 5) to a hosting service with a free domain (this will be the one transfered in)

1. No matter what the settings are, because the domain is set to free and matches the hosting services it will get renewed every year adding additional years on.

2. The CRON job changes the expiration date and next due date for the domain in WHMCS to match the domain's real expiration date. This breaks the shared invoice with the hosting service, but the domain is not renewed until it's expiration date thus i do not end up paying for the extra years, this is what i want. so to clarify with this option, if a domain is transfered in with extra years those years are used up before the domain is renewed at the register irrespective of whether it is free or not.

Answer
Both of the scenarios that you've provided can be correct.

  • If you do not have Domain Sync and Sync Next Due Date enabled then Scenario 1 is correct.
  • If you have Domain Sync and Sync Next Due Date enabled then Scenario 2 is correct.

Further Notes - Free Domains and Preventing Auto Renewal

WHMCS will attempt to automatically renew the domain name when the Expiry Date that it has stored comes up.

If this date does not match the date with the registrar then this could cause the domains to be renewed early or late.

If you haven't done so already I would recommend going to Setup > General Settings > Domains and enabling Domain Sync, after doing so you'll want to set up a cron job to run the domainsync.php script. This will allow WHMCS to contact your registrar, find out the expiry dates for your domains, and then update this information in WHMCS.

You can read more about this at http://docs.whmcs.com/Domains_Tab#Domain_Sync_Enabled

When a hosting service is renewed it seems to renew the domain as well because it is attached to the hosting service.

That's kind of what happens. It's a bit more complicated than that though.

When you use the Free Domain option with a Product/Service it will offer the client a free domain name which will be renewed as long as the associated service is active. This free domain will always have a billing cycle of 1 year regardless of what the customer selects.

Example: http://screencast.com/t/iaJEmwUNq

So, there are two things to address to clarify how this all works.

  1. How do the domain and service get invoiced together?
    This works because the domain name and the service share a Next Due Date. WHMCS groups invoices together entirely based on the due date.
  2. How is the domain name free?
    If you go to the domain name page you'll see that the domain name has a recurring amount of "0.00". Anything that is "0.00" is automatically marked as paid by WHMCS.

It's not free because it's attached to the service. It's free because it was purchased along with the service. It's still an individual entity that has its own due date and its own recurring value. If, for some reason, the domain has been registered for longer than 1 year or the expiration date has changed with the registrar then WHMCS has no way of knowing that unless you have domain sync enabled.

Domains and hosting are seperate items and it is just by their invoice date that they appear on the same invoice

So if a customer transfers in with let say 10 years on their domain i obviously dont want to keep renewing that domain and wasting money or a domain might of got extended automatically along the transfer line, ie enom automatically renews a domain for a year if there is not many days left on the domain when transferring.

So (still with free domain)

when the domain is transferred in, the hosting services configured etc.. I can then manually change the due date on the domain next due date for some time in the future and the domain will stay free because it has 0.00 set.

The domain would then not get renewed until the time i have set in the future, thus saving me renewal fees on a domain with extra years.

the domain and hosting services only appear on the same invoice because of the invoicing date but they are both quite seperate.

The domain would then not get renewed until the time i have set in the future, thus saving me renewal fees on a domain with extra years.

Yeah, that's correct. WHMCS won't attempt to renew the domain until the Next Due Date for that domain name.

So, if you had Domain Sync enabled then WHMCS would automatically check with your registrar to see what the expiration date was; it would then update the Expiration Date and Next Due Date in WHMCS to match that date.

why would the CRON job alter the 'invoice due date'. (ps i have date syncing enabled).

The domainsync.php file does not alter the "Invoice Due Date". If you have the "Sync Next Due Date" option enabled at Setup > General Settings > Domain then it will alter the domain's Next Due Date in addition to the Expiration Date.

If what you said is true above, then all my domains would not get renewed or purchased until their expiry date meaning that i would never have to pay for extra years when i did not need to which is the opposite of what i was told earlier.

WHMCS will only attempt to generate a renewal invoice around the time of the Next Due Date for the domain name. If you have 'Domain Sync' enabled, with 'Sync Next Due Date' also enabled, then WHMCS will automatically update the Expiration Date and Next Due Date of the domain name for you.

What happens with renewals of a serivce with a free domain with premature domain renewal?

Scenario

  • Domain Sync and Sync Next Due Date are enabled
  • i have CRON enabled
  • i am computer literate etc....

Question

can you answer/confirm the 2 following questions:

  1. if you create a new service with a new domain which is free, payment period 1 year, the domain will get renewed when the service is paid for in 1 years time?
  2. if you create a new service with a new domain which is free, payment period 1 year, and "Enable - Number of Days to Set Due Date in Advance of Expiry: 14 days". How does this work because the Free domain would be out of sync with the service. 1 of 2 things i can see would happen here:
    1. WHMCS will only send an invoice for the domain, and the domain will get automatically renewed for free seperate to the hosting service
    2. WHMCS is clever and will send the service + domain renewal on the same invoice 14 days before expiry

The reason i ask these questions is i dont want a domain name to get renewed automatically if a client does not renew their hosting with a free domain name.

Answer

Thanks for contacting technical support. To address your points:

  1. Provided the Next Due Date and Payment Method of the domain and the product were exactly the same; yes.
  2. In this situation, scenario (i) will occur.

You can enable the Setup > General Settings > Domains tab > Auto Renew Requires Product option, which means that the domain will only be renewed if the service is still active at the time the domain comes up for renewal.

NB if using the Advanced Date, the logic will be run for that date not the expiry date of the domain. In this situation the domain would still be renewed for free separate from the product of the same name. It is for this reason we recommend that when offering domains which renew for free to disable the Sync Due Date option: http://docs.whmcs.com/Common_Promotions#Notes

Follow-up Question

As a follow up to the option "Only auto renew free domains that have a corresponding active product/service for the same domain"

How would this apply to my situation (option 2) if i set the domain to be renewed 14 days before. From what i can see the domain will still get renewed automatically because there is an active service and then, if in 14 days my client decides not to renew his hosting i will of renewed his domain when not required costing me money.

Follow-up Answer
In that situation the domain would still be renewed for free separate from the product of the same name. It is for this reason we recommend that when offering domains which renew for free to disable the Sync Due Date option: http://docs.whmcs.com/Common_Promotions#Notes

Conclusion
If you set premature renewals of domains, WHMCS will check on that date which is 14 days before the domain's expiration date wheather the domain has an active service which has a matching domain name. If there is, the domain will be renewed. This does allow the oppurtunity for the customer to get a free renewal if they dont renew within the next 14 days.

So this is a bit of a pointless setting. There should be an option for this to only apply to non-free domains.

What I did and why

What I have configured

  • CRON jobs - both the main WHMCS CRON and the domainsync.php CRON job
  • Auto Renew on Payment - Enabled
  • Auto Renew Requires Product - (optional) (i have selected "off" because i have multiple domains on one service)
    • Off= all free domains will be renewed reguardless of whether there is a product/service for that domain.
    • On = only domains with a matching product/service will auto renew, the rest will trigger and email to the WHMCS admin to manually renew that domain
  • Domain Sync Enabled = On
  • Sync Next Due Date = On (with no Advanced billing)

My setup above has the following results

  • Domains will renew for the number of years set in their admin panel in WHMCS. Free auto renewed domains might only renew for 1 year (check both these)
  • I have the main CRON job enabled because WHMCS will not work correctly without it
  • i have enabled the domainsync.php CRON to allow WHMCS to get the expiry dates of the domains from the registrars and keep them synced with the WHMCS records.
  • Domain expiry dates always match those stored at the domain registrar
    • This prevents customers domains from expiring in error
    • allows WHMCS to use this date for renewing the domain
  • Domain expiry dates are synced to the domains invoice due date. This allows WHMCS to only renew the domain when it is going to expire which prevents additional years being added to that domain when they are not required, saving the company money. consider:
    • not all customers signup for a new domain and hosting with your company.
    • not all customers signup for a new domain and hosting with your company at the same time.
    • some customers transfer in their domain which has multiple years left so do not need any extra years being added on until the domain renewal date. All of their extra extra years will get used up before i pay for anymore
  • if a free domain and it's matching service have the same renewal dates, when the single invoice that WHMCS sends out is paid, the domain and service are auto renewed
  • If a free domain and it's corresponding service renewal dates do not match, the free domain will be marked as paid and WHMCS will renew it automatically or send out an email to the WHMCS admin for manual renewal.
    • This depends on the Auto Renew Requires Product setting. The domain will be renewed as a seperate item to the service because it is only the renewal dates that link the domain and service.
    • The domain will get renewed for free automatically without payment during their 1 year subscription, but only once. This means i am still no worse of because i would still have to renew their domain at least once in a yearly billing cycle.
Read 1621 times Last modified on Sunday, 06 March 2016 17:41