var sidebar_align = 'right';
var content_container_margin = parseInt('350px');
var sidebar_width = parseInt('330px');
Domain resolving script
Does anyone know where I can get a script to run on the server that tells me which domains still resolve to the server and which domains point elsewhere so i can remove them
Celebrating 9 years of customer service. Domain names, shared/semi-dedicated/dedicated hosting, SSL certificates, merchant accounts, reseller options, and referral program, since July 2000.
theres a script request section, someone there might be able to help you
What operating system are you running? Do you have a control panel?
It will read the list of hosts form a file named 'hl'
and output the host that caused an error in 'badhosts'
The first echo and exec 2>&1 is for running as CGI and for debugging.
PS. If you want to check if the hostnames resolve to specific IP address or not, you can do like this, I guss.
while read -r h
host "$h" || echo "$h" >>badhosts
# the IP
while read -r h
case `host "$h"` in
*) echo "$h" >>badhosts;;
Last edited by extras; 12-20-2006 at
If you use a script such as this, you will want to ensure you are running it against external resolvers. If you host it against the same DNS server they will all return true.
Oh, it's true if he runs it on the server using the same DNS.
I didn't think about that. Thank you.
Well, I guess he can edit resolv.conf, or use "dig" with @ns.whatever.com instead of "host".
Probaby, it's better to use Perl or other language, if there are lots of hosts to check ...
I only know because I have done it before.
We run a simple PHP script that checks the actual nameservers (since all customers on our servers are on our specific nameservers) on a list of domains from the relevant whois. Not overly clever - but effective.