Goal: Find short domain names that are able to be registered.
It is really nice to have a short domain name. Unfortunately, most of these short domains have long ago been registered in the most popular TLDs like .com. Domain name speculators simply have registered all known words and even increasingly all of the short combinations of domains in a particular TLD.
But before assuming all is lost there should be a simple way to check to see which domains could be possibly available. I'm backing away from claiming this method that describe will guarantee availability of a particular domain because the only true way to test for availability is to attempt to register the domain at a registrar. We can eliminate many potential candidates that we know are already registered it will make the list to manually check must smaller and manageable.
Before we can check for domain availability we need to generate a list of potential candidate domains to match our specifications with regards to length.
A valid domain has a few restrictions, it must consist of the characters from a-z and 0-9 it can also include a hyphen. Domain's can't be fully numeric, they also can't start with a hyphen.
This perl program will generate domain names that are valid and have a length that you specify.
Running the program for domains of length 1 produce output like:
a.com b.com c.com d.com e.com ...
Length 3 is:
... br8.com br9.com br-.com bsa.com bsb.com bsc.com bsd.com bse.com bsf.com bsg.com bsh.com bsi.com bsj.com bsk.com ...
Now that the list of domains to verify has been produced, the easiest and least network intensive way to check to see if a domain is registered is to see if there is a NS record in the zone server for the TLD.
DNS produces results by asking servers from the root down to the final domain level recursively. For instance if we want to get the IP address of nytimes.com, our DNS client will first ask the root zone, which DNS servers resolve domains for .com, then our client asks one of the .com servers which name server responds for nytimes and finally the DNS client asks the nytimes.com DNS server to get the final result.
The main trick of this method is only asking the TLD's servers if a zone exists and not verifying the result down the entire tree. Frequently someone will register a domain but doesn't add corresponding DNS entries for the domain at the final level. This may be due to the lack of wanting to handle requests, or other laziness. Another reason to only ask the TLD servers is that the infrastructure of the TLD servers is scaled to accommodate many orders of magnitude more DNS queries then the DNS servers of a particular zone. So if we're going to resolve 30,000 domains, it's best to keep things at the TLD.
The following perl program does exactly that. You can run it like this:
perl generate-domain-names.pl .com 2 2 | perl resolve-domains-at-tld.pl
It will produce output like:
9w.com 1 9x.com 1 9y.com 1 9z.com 1 9-.com 0
It first lists the domain name then an integer reflecting if there are DNS NS records present for that domain. If there are DNS NS record present it means the domain is registered. So use grep to determine domains that don't have NS records, then go to your favorite registrar and try to register them.