Results 1 to 4 of 4
  1. #1

    WHM Subdomains and DNS problem

    Hello everyone!

    I'm a newbie here but I was not able to find a solution to this problem.

    I'm setting up an auto-configuration script to setup accounts in WHM and create subdomains and so far everything is working fine!

    But we have a problem - when an account is setup and the subdomain is not working yet when a customer visits it he gets wrong dns information and then when the domain starts working it's not working for him.

    I know that flushdns solves this issue under Windows but I don't want to make my newbie customers run complicated commands.

    Will a 5 minut delay solve this issue from the moment the account is created to the moment the customer visists the site?

    I really need help on this - please let mi know.

  2. #2
    Join Date
    May 2009
    Location
    United Kingdom
    Posts
    1,695
    Quote Originally Posted by michalexpromo View Post
    Hello everyone!

    I'm a newbie here but I was not able to find a solution to this problem.

    I'm setting up an auto-configuration script to setup accounts in WHM and create subdomains and so far everything is working fine!

    But we have a problem - when an account is setup and the subdomain is not working yet when a customer visits it he gets wrong dns information and then when the domain starts working it's not working for him.

    I know that flushdns solves this issue under Windows but I don't want to make my newbie customers run complicated commands.

    Will a 5 minut delay solve this issue from the moment the account is created to the moment the customer visists the site?

    I really need help on this - please let mi know.


    I see what your trying to do but I am afraid I’m not sure what the solution is. I am not sure if this is relevant but WHMCS allows you do this so there must be a way.
    Zomex ~ Templates & services for web hosting resellers since 2009!
    #1 Web Hosting Templates for WHMCS Templates | WordPress | HTML | Blesta | Clientexec
    █ Professional WHMCS Services | Installation | Configuration | Integration | Upgrades

  3. #3
    Hey - good to know that it is possible - thank you for that info.
    But still I have a custom script so I cannot use WHMCS.

    Would be greatful on information on how this is done.

  4. #4
    Join Date
    Feb 2005
    Location
    Australia
    Posts
    5,849
    When you add a new subdomain you're updating the dns zone information (either creating a new zone or a new A record for the existing zone). However a dns lookup won't catch this new information until your nameservers reload the zone files. IDK how cPanel handles this but it makes sense to do it in two stages - first updating the zone file(s) and then, perhaps after a short delay, reloading the zones. (It makes sense because multiple updates will require only one reload at the end.)

    If you're using redundant nameservers there may be another separate delay while the information on the secondary is updated.

    If you don't mind the risk of higher loads due to unnecessary reloads, you could probably get your script to force a named reload after adding the subdomain, and then wait for that to finish before sending notification to the client. Alternatively a simple time delay should also work - most likely less than 5 minutes but you'd need to experiment.

    Edit: You can test whether a nameserver has updated information using "dig @nameserverIP sub.example.com" or "nslookup sub.example.com nameserverIP"
    Last edited by foobic; 11-08-2009 at 06:58 PM.
    Chris

    "Some problems are so complex that you have to be highly intelligent and well informed just to be undecided about them." - Laurence J. Peter

Similar Threads

  1. Replies: 2
    Last Post: 11-10-2009, 05:04 PM
  2. Replies: 2
    Last Post: 01-05-2005, 04:50 PM
  3. subdomains transfer problem!!!
    By atul in forum Hosting Security and Technology
    Replies: 1
    Last Post: 05-08-2004, 10:38 AM
  4. eNom's 'ultrafast dynamic DNS'
    By Korn in forum Reseller Hosting
    Replies: 2
    Last Post: 05-05-2004, 02:19 PM
  5. Subdomains problem!
    By minasonline in forum Hosting Security and Technology
    Replies: 1
    Last Post: 04-19-2003, 04:04 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •