Results 1 to 4 of 4
Thread: WHM Subdomains and DNS problem
-
11-08-2009, 03:56 PM #1Newbie
- Join Date
- Nov 2009
- Posts
- 5
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.
-
11-08-2009, 04:19 PM #2Web Template Master
- Join Date
- May 2009
- Location
- United Kingdom
- Posts
- 1,695
█ 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
-
11-08-2009, 04:25 PM #3Newbie
- Join Date
- Nov 2009
- Posts
- 5
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.
-
11-08-2009, 06:55 PM #4Retired Moderator
- 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
-
.COM domain registration/transfer only $7.49 - total DNS control
By Michaelz in forum Domain Name OffersReplies: 2Last Post: 11-10-2009, 05:04 PM -
Two different DNS' resolving to same IP, One being a subdomain???
By szarwell in forum Domain NamesReplies: 2Last Post: 01-05-2005, 04:50 PM -
subdomains transfer problem!!!
By atul in forum Hosting Security and TechnologyReplies: 1Last Post: 05-08-2004, 10:38 AM -
eNom's 'ultrafast dynamic DNS'
By Korn in forum Reseller HostingReplies: 2Last Post: 05-05-2004, 02:19 PM -
Subdomains problem!
By minasonline in forum Hosting Security and TechnologyReplies: 1Last Post: 04-19-2003, 04:04 PM