Jump to content

Different Nameserver scenarios


tobiasp

Recommended Posts

Hi,

how can I manage following scenarios:

 

User registers/transfers a Domain and orders webhosting -> Nameserver-Set A should be used (General Settings->Domains->Default NS)

because they point to the nameservers for the different webhosting servers.

 

User registers/transfers a Domain and orders no webhosting -> Nameserver-Set B should be used (the ones from the domain registrar so that the built in DNS management can be used) also the DNS Management feature should be enabled by default when ordering domain only.

 

How could I achieve this?

 

cheers

Link to comment
Share on other sites

Hooks and API: For registrations, use https://developers.whmcs.com/hooks-reference/registrar-module/#afterregistrarregistration . For transfers, use https://developers.whmcs.com/hooks-reference/registrar-module/#afterregistrartransfer . In the hook, get client services and if none, use the set "B" that you'll need to hard code or otherwise have outside of WHMCS's defaults. Then you would call the updatenameservers API: https://developers.whmcs.com/api-reference/domainupdatenameservers/ within the hook.

 

However, note that updating the nameservers for transfers could potentially cause downtime / issues for the customer if the DNS records are not pointed to their proper place and as such I would be recommend only doing this for registrations.

Link to comment
Share on other sites

Okay thanks for the idea. I would also like this to be shown in the frontend. On the page "cart.php?a=confdomains" when a domain without hosting is in the cart there are the fields for changing the nameserver displayed and populated with the default ones (Set A). when having a domain with hosting in the cart there is no nameserver settings shown (and I guess whmcs will use the ones from the settings)

 

So do you think it would be the best course of action to set the ones for domain-only in the backend so that they are displayed in the "choose your nameserver fields" but override them when domain+hosting is checked out...

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated