You are here:Home»KB»Web Design»CMS»WHMCS»Domain Renewal
Saturday, 05 March 2016 14:00

Domain Renewal

Written by

There might be many question about how WHMCS domain renewal works when you first start off so I have collected my notes here.

Configuring an Automatic Domain Registrar

One of the main functions of WHMCS is the ability to purchase domains, this feature can become difficult to manage if you use a third party Domainname provider and manully configure the dates, names and addresses etc.. associated with a domainname purchase.

This is where having an 'Automatic Domain Registrar', the service when configured will allow seemless purchase and management of domain names and their purchase.

I will be using 'ResellerClub UK' which offers a fully functional API that works with WHMCS. ResellerClub has the best prices and most importantly all domain managemnt features are enabled.

Here is a list of features that made me decided on Reseller Club

  • Fully supported API via WHMCS plugin

  • Cheapest Prices

  • Most TLD are supported

  • ID Protection for free

  • Email Forwarding for free

  • DNS Management for free

add setup instructions here

Domain Renewal Questions

  • set the domain expiry date the same as the due date for the primary domain otherwise the invoiceing gets messy - on the primary domain set the exipry date the same as the Next Due Date

  • make sure for domains, free domains you add 1 year renewal unless you are doing 2 year only packages. (ie .co.uk)

  • also setting the .co.uk to 2 years only, disabling the 1 year, ment that accounts with free tld were getting billed.

  • how does the date move forward. on payment of the invoice does it apply the registration period extension to the domain and the next due date, perhaps

  • searching how to configure autorenewing free domains when they have 10 years on them

  • if auto renew automatically renews for one year, how does whmcs cope with .co.uk

  • on domain pricing for TLd, if you use -1 for transfer and rebewa; it will disable this option! (should transefer boxes be lareger as you go donw th elist)

  • If a domain has more that one yearleft and is being rewed as a free domain will whmcs decline to send the renewal request to the registrar

  • TLDs (and ccTLDs) supporting EPP and ID Protect http://forum.whmcs.com/showthread.php?t=13390

  • better way of setting up a domain name, register and renewl should always be the same and disable all transfers apart from year 1

  • if free domain is already registered for more than one year will whmcs still add a year?

  • a module that might be of some use,

Domain Renewal when no automatic Registrar

An issue cropped up while i was setting up my client accounts in WHMCS that your system might sort.

when you setup a domain name you have 3 date boxes:

  • Registered Date: when the domain is registered
  • Expiry Date: when the domain name expires
  • Next Due Date: when the WHMCS should bill the client

My problem arises if a client transfers in with a domain with lets say 2 years on it. currently i do not use an automatic registrar, when the client is invoice the date the domain is to be renewed is a year on top of what is there so i have changed the expiry date to match the 'Next Due Date', this makes the invoice reflect the next year along with hosting renewal. this scenario is only valid for the free domain on a hosting package.

Dealing with domain provision where auto registrar setup and mail in payments

  • intially i set the order from pending to active in the order page, this did not seem to work
  • i set it back to pending
  • i then click on view order and it had a button on this page to set back to pending which i did - the order was tagged as incomplete
  • (manage orders page popped up) the registrar options then poped up and allowed me to select an auitomatic registrar, for some reason reseller club was not selected
  • i have also addded both domains IP address, my main server one and my static ip as it is the main server that seems to do the curl things, see this thread

http://forum.whmcs.com/showthread.php?t=38581&page=2#18

good website

http://www.resellerclub-mods.com/whmcs/knowledgebase/49/I-whitelist-my-Server-IP-at-ResellerClub-but-the-FREE-tools-still-does-not-work.html

- i will reporvision the domain which seems to need all details filled in for it to work

Manual Renewal Required message

on the page http://docs.whmcs.com/Domains_Tab#Domain_Sync_Enabled the section: "Auto Renew Requires Product"

With this option ticked, domain names with a Recurring Amount value of 0.00 will only be renewed if there is a corresponding service under the same client with a matching domain name. If there is none, the domain renewal will not be processed and a "Free Domain Renewal Manual Action Required" error is emailed to admins along with an entry in the Activity Log. "

When a domain do not have a product associated with it giving a free domain, the administrator will receive the following message:

Lancastrian IT

The domain example.co.uk (ID: 11) was just invoiced for renewal and automatically marked paid due to it being free, but because no active Product/Service matching the domain was found in order to qualify for the free domain offer, the renewal has not been automatically submitted to the registrar. You must login to review & process this renewal manually should it be desired.

https://www.example.com/whmcs/admin/

There is not activation link in this email but would be a great feature to have an activation link.


Unsorted Notes

The following note might be already in place in the instructions above, but just incase until I get more time I will inclued them here

Free Domain Questions

  • next dues dates should be the same for free

  • keeps invoicing nice, but as soon as you run a sync script will not work currently i beleive on the primary domain that you should have the domain expiry date the same as the 'Next Due Date', maybe 00/00/0000 is the same (not 100% sure about that) as a non registrar is dumb and cannot work this out.

  • Offering Free Domain Registration with Selected Packages http://docs.whmcs.com/Domains_Configuration

  • when you buy hosting with a free domain, it tells you which domains are free

  • when it creates a domain it show 0.00 in first payment and recurring payment, this is how it is free

  • free domain, applies to select all domains, select requires and select all domains types. payment method dont selecet any (transfers are probably one time)

  • the fact that the free domain and the domain is linked just by the domain name is a bit ambigous ast eh client might elect to have another domain name as his free one

  • what happens if a client wants to change the domain name that is hosted, would changing this change which domain is free

  • to kill birds with one stone add a free domain name tick next to the cost in a domain. this ouwld allow an ivoice to show the domain name cost but then show it free ie..

1 mydomain.co.uk (value £8.00) £FREE

this would also allow german users to set more than one free domain name for their clients.

- on the hosting page make it clear what domain is their attached free one and/or the free domain to show which hosting package iot belongs to

WHMCS Domain renewal logic notes

  • whmcs is made of 2 parts. one with logic and the second is where all the account info and pricing for them is kept and is static so once set it is et unitl the bulk changer is used
  • £0.00 = FREE, this can cause confusioin as the two for me are different
  • a free domain is maintain as free as long as a qualifying product is on file. the domain and product are matched by the domain name

What happens when the qualifying product is removed? - The domain price reverted to a normal price

According to matt there is logic to prevent free domains remaining free when their qualifying product is removed.

A free domain renew logic issue

A free domain will not renew unless there is an active product for the same domain so there is protection against a free domain renewing when it shouldn't.

what about domains set to free/0.00 where they do not have an associated product. ie my domains are set to free so will these not renew


#439408 - Renewing a free domain after they transfer in with 3+ years

This is a thread from WHMCS Support and explains a alot about how the domain renewal logic works. I will also put my conclusions at the bottom.

Me

  • I will be using resellerclub as my automatic registrar.
  • since writing this, .co.uk now support 1 years renewals

I have transfered in several clients recently and their domains have 3+ years on them which means i do not need to add any more years on to them for a while. But the problem is they are on a hosting package with a free domain. Their 'Next Due Dates' match in the hosting and domain name to allow for correct renewal. now from reading up, a free domain is renewed every year which gives rise to 2 problems.

  1. if the domain has, lets say 3 years left on it before it expires, will whmcs recognise this and not add any more years on until it needs to, ie less than one year left when renewing
  2. how does it handle .co.uk domains when they must be renewed for a minumum of 2 years at a time.

WHMCS Staff

  1. You would need to set the next due date accordingly for the future date it is currently due for. Otherwise, a renewal would be generated sooner than you wish.
  2. You need to ensure the period on the .co.uk domains is 2 years and the next due date is correct for the current expiry.

Me

This does not answer my question at all. also if I have 900 domains to monitor how can I check them all manually and I will also be using a expiry date sync cron job which will always set the correct expiry date for domain.

Just in case I did not put it in my previous email, these renewals I talk about are for hosting with free domains. According to your literature your system auto renews them once a year with hosting when they are set to have a free domain and the 2 'Next Due Dates match'.

I refer you back to my original question. I need to know the logic of renewal for Free domains in reguards to the 2 scenarios below.

I can try and write a better client scenario if this will help.

I am not a noobie i have wrote a 21 page installation guide. The answer i seek is technical not end user level.

WHMCS Staff

  1. The domain would be renewed with the registrar and the due date in WHMCS increment forward when the renewal invoice was paid by the client. If you just want the due date to increment forward and not be renewed you should set the registrar setting for that individual domain to "None", then you can set it back at a later date.
  2. As long as you've only configured a 2 year renewal price as Andrew advised then .uk domains will only be renewed for 2 years at a time.

Me

Your answer did not help

WHMCS Staff

Sorry for the frustration. However there shouldn't actually be any problem here. Free domains don't renew every year regardless of the settings on them. They only renew when the domain is set to be due. So if the next due and expiry dates are both 3 years out in the future, then that domain will not renew until 3 years time. So basically I think the answer to your original first question is infact Yes, WHMCS will recognise it's not due and not renew it, since the due date won't be the same time as the hosting package.

And for .uk domains, you would ever setup a 1 year period pricing for them, so they always default to a 2 year minimum. Again with the above clarification that should clear this up for you as free domains do not renew every year. Just when set as due, which for a .uk would be ever 2 years only.

Me

Hi, i can see you read the ticket to tried to answer but again no logic was descibed. this question is fundamental to how free domains work and depending on the outcome maybe a bug or feature request is needed. so i will try once more.

This question is around the question 'what happens with autorenewals of free domains which already have a number of years on them?'

You do not want to keep adding years on to a domain that already has loads. It is a waste of money and might not be possibly. so i have writtena worked example below hopefully that might help explain myself.

Lets assume:

  • All my hosting packages are for one year
  • All my hosting packages will get one free domain
  • I have configured resellerclub as an automatic registrar

i use the cron job to sync domain expiry dates

Scenario:
I manually transfered in one customer today (10-01-12) with a .com address, he has 4 years left on his domain. The following are the dates in the clients profile

  • Hosting Next Due Date: 09-01-2013
  • Domain Next Due Date: 09-01-2013
  • Domain Expiry Date: 05-05-2016

When 09-01-2013 (or slightly earlier) comes and the customer renews for one year 1 of 3 things will happen:

  • the domain and hosting is extended in whmcs for one year, the domain at resellerclub is extended a further year till 04-05-2017 and the expiry date in whmcs is updated
    The following invoice(s) are sent
    invoice for hosting 09-01-2013 - 10-01-2014
    invoice for 1 year domain 05-05-2016 to 04-05-2017 (£0.00? full value then discounted?)
  • hosting only is extended in whmcs for one year, the domain at resellerclub remains unchanged at 05-05-2016
    invoice for hosting 09-01-2013 - 10-01-2014
    invoice for 1 year domain 09-01-2013 - 10-01-2014 (£0.00? full value then discounted?)
  • hosting only is extended in whmcs for one year, the domain at resellerclub remains unchanged at 05-05-2016
    invoice for hosting 09-01-2013 - 10-01-2014
    no invoice for domain is sent

We will deal the .co.uk after this. i need the logic so i can figure out how whmcs works with free domains

Me

it is recommended to have the 'Next Due Date' of both the domain and the hosting to match otherwise you send out invoice for them both the hosting and domain and the customer does not get a free domain.

please advise ( i refer you to my worked example)

WHMCS Staff

The domain would be renewed on 09-01-2013 for 1 year and therefore extended until 05-05-2017, the Next Due Date would then become 09-01-2014.

Normally the Next Due Date of the domain and hosting should be the same yes, this ensures they are invoiced for renewal on the same invoice and therefore the domain is only renewed when this invoice is paid. However you seem to be implying that because the domain has 4 years to expiry you don't want to actually renew the domain until the year of expiry (ie. 05-05-2016) Is that correct?

If that is the case you'd set the domain's Next Due Date to 09-01-2016 and the domain will not be renewed in 2012, 2013, 2014 or 2015, but the renewal invoice in 2016 will include both hosting and domain for 1 year. The expiry date would become 05-05-2017 and the next due date 09-01-2017.

Me

After reading you reply i have concluded:

  • that free domains DO NOT WORK. They only work in one situation which all be it, is the most common it is by no means the only one.
  • unless the domain is bought new when a client buys hosting with me, the free domain is not guranteed to work and the client is most likely going to receive an invoice for the domain
  • there is no way of tagging a domain name to a hosting package to make sure it that one domain is free with this hosting package.
  • using the 'Next Due Date' by you own answer only works by virtue and if i set another date on this account it will get billed on that date separately. matching and altering dates on automatic transfers etc.. is a stupid thing to try and do manually.
  • the work load to manage a large hosting site with the setup is massive

Solution:

  • make an option in a domain's setting to tag it as a free domain belonging to a certain hosting package
  • make an option in a domain's setting to tag it as a domain belonging to a certain hosting package
  • this options is really important especially if the customer has many domains, should i go and hunt the domain name that he is getting free and manually check the dates.
  • allow a domain or free domain to be invoiced for one year to match the hosting to keep it neat (cutomers like that) for that year period
  • make an option in settings somewhere to only extend/renew a domain if it is required. this would check the Expiry date automatically) ie if more than one year do not renew. (i am surprised why this is not so and why i wanted to get to the bottom of these settings) or whatever number of years is appropriate etc.. this is required for full automation especially on transfers.
  • allow someway of handling .co.uk properely, if these are renewed every year for 2 years this will get stupid, i tried setting up 2 years only with a free domain package and it just billed for 2 years
  • proper instructions on how to setup domains and free domains including all the issues with dates i have outlined here when you have imported using the whm import utility.(all instructions you have written are clear and concise but have totally ignored this particular section)

I hope these ideas help. I am not alone in this plight but i have been a bit more vocal and concise. please can you clarify these points and let me know if they are something you will take forward as i really like whmcs but i found this particular part of whmcs very lacking but should be easily fixed.

WHMCS Staff

Thanks for taking the time to send in your feedback. I think there are still a few misunderstandings here of how it actually works but we do appreciate your comments. In response to some of the points you raised:

  1. The free domain always needs to match the products domain, therefore it's quite easy to pair the 2 items up
  2. A .co.uk free domain is handled properly. It does not renew every year. No 2 year minimum TLDs renew every year, not just .uk
  3. A free domain will not renew unless there is an active product for the same domain so there is potection against a free domain renewing when it shouldn't.

All you need to do for the existing domains is add the domain records, set the price to free, next due date to match the product, and expiry date to the real expiry date of the domain.


#TYY-003776 - what happens with renewals of a serivce with a free domain with premature domain renewal

Me

firstly let me confirm my situation

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

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: 14days". 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 14days 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.

WHMCS Staff

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.

Me

as a followup 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 14days before. From what i can see the domain will still get renewed automatically because there is an active service and then, if in 14days my client decides not to renew his hosting i will of renewed his domain when not required costing me money.

Have i found a bug. I would of expected the following when using this option:

when using "Enable - Number of Days to Set Due Date in Advance of Expiry: 14days"., the php should check to see if the domain is a free domain, which if dependent on a service to be free, has the same start/renew date, the service should also be billed 14days earlier so as to keep the invoicing and financials connected. Then if the hosting/service is not paid for the domain is not renewed.

This really is targeted at new domains that are taken out with hosting packages.

WHMCS Staff

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

Me

thats my point. This is a bug.

This needs fixing how i described below. This domain sync features is very useful for me and my clients.

can you clarify that you will add this to your bug tracker.

WHMCS Staff

We welcome feature requests online at http://requests.whmcs.com . Feel free to search for and vote up existing requests or submit your own ideas.

In the meantime you may find a member of our community has developed a solution for this, so it would be worth searching our App Store: http://www.whmcs.com/appstore/

Me

I would just like to clarify the behavior of a setting - Auto Renew Requires Product.
(http://docs.whmcs.com/Domains_Tab#Auto_Renew_Requires_Product)

  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.
    1. 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.

WHMCS Staff

Yes your assertions in points 1 & 2 are true.

  1. Yes that is also a correct assertion.

#MTS-670914 - free domains and preventing auto renewal

Me

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).

WHMCS Staff

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

Me

i am not sure this answer my question.

i have all the cron stuff setup with reseller club etc..

My question relates to FREE domains.

when a hosting service is renewed it seems to renew the domain as well because it is attached to the hosting service. Can you clarify this is what happens.

WHMCS Staff

> 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.

Me

Can you just clarify the scenario below because i think you have identified the 2 variables in this equation.

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.

WHMCS Staff

> 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.

Me

i am a little confused now.

  • why would the CRON job alter the 'invoice due date'. (ps i have date syncing enabled).
  • And if it does alter the due date, what does it alter it to? (i know the CRON syncs the expiry dates of the domain)

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 Staff

> - 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.

If you do not have this for you then you will need to update these manually.

Me

I appreciate the help but you have given me 2 different scenarios for the orginal question.

NB 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. not 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 real domain expiration date, this breaks the shared invoice with the hosting service, but the domain is not renewed until it is near expiration 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.

WHMCS Staff

Honestly, I think the confusion here lies with the phrase "cron job". A cron job is something you set up on your server to tell it to run a particular file repeatedly.

There are a few different files that you can create a cron job for in WHMCS; the cron.php file, the domainsync.php file, and the pop.php file.

By default you would have only set up a cron job to run the cron.php file; this is because this file is required. The cron.php file DOES NOT automatically sync domains with your registrar; even if you have Domain Sync enabled it will not do it.

In order to have WHMCS do this you need to set up an ADDITIONAL cron job to run the domainsync.php file. This file syncs domains with your registrar.

In short:
If you don't have Domain Sync and Sync Next Due date enabled AND a cron job set up to run the domainsync.php file then WHMCS will not automatically update the Expiration Date and Next Due Date for you. It will simply go by whatever it has set for the Next Due Date for the domain and generate invoices accordingly.

Me

I have already told you i have all the CRON stuff setup(at the beginning, my second post) (cron.php file, domainsync.php = setup). i understand what a cron job does. I write my own php code. i understand these things. There is no confusion at my end. My whmcs is setup correctely.

so can you look at the 2 scenarios (2 posts below) i pointed out below (which you have suggested) and tell me which is true.

1. or 2.

WHMCS Staff

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.

Me

that is exactly what i needed.

thanks

Read 1310 times Last modified on Monday, 07 March 2016 17:47