Gravatar

Geoff Evason

Domain Name Registration API Plugin for Rails

If you’ve ever had an app where you want to allow users to purchase a domain name, you’ve probably felt the pain of trying to interface to a registrar.  Although some have APIs, my search found that most were hard to interface to or poorly documented.  Many even required signing up as a partner (and paying a big fee) before you could even get documenation.

After much searching and experimenting I decided to go with Register.com’s XML api for my app. They offered the best API, and the easiest signup path.

I bundled the main part of the interface into a rails plugin.  The plugin is stored on github: http://github.com/geoffevason/register-api/tree/master

To install the plugin do this:


script/plugin install git://github.com/geoffevason/register-api.git

The plugin is of little value unless you have spoken to register.com and have received their API documentation. You need to register as a partner (it’s free) and have the IP of your dev machine whitelisted for testing.

Most of the info on use is in the readme in the plugin. You can call any of the Register.com API methods by calling Register::API.


# A call to the API looks like this
# Register::Api::Call(params)

# Example to check if the domain name google.com is available
Register::Api::Check( :tld => 'com', :sld => 'google' )

The plugin also contains a few helper methods and classes. If all you want to do is let people search for an available domain, and purchase it, then everything you need is in these helpers. Some important logic remains in my controllers, but if you have any questions, let me know. geoff [a] evason.name

Tags: , , ,

  • enortham
    Hi Geoff, we decided to go with Dynadot. I checked out register.com and couldn't seem to find any information about pricing or documentation on their website without having to call them. The site mentions that there is an XML API but doesn't go into details. It as super easy to register domain names via Ruby with Dynadot so that worked for us. Checkout http://www.easybroker.com/blog/2010-10-domain-name-registration-api/ for more on how we chose registrars and a Ruby snippet to register a domain name.
  • Thanks for the tip. If I have to do it again I'll have a look at dynadot. With our implementation the domains were register by our users themselves (rather than us) so we had to set up an account for them, use their credit card, and go through the entire shopping cart lifecycle. I'm not sure if I looked at dynadot, but register was definitely the best of the rest. When looking I found that most sites didn't have pricing info, or much api info on their external sites, but after some digging, the pricing was all pretty much the same...
  • enortham
    Do you mind sharing what you had to pay to get started with register.com and what it costs for a .com domain for example? We had very simple requirements since we already have our own billing system and domain name servers so Dynadot might not provide everything you needed.
  • There was no signup/startup fee and domains are less than $9/yr
blog comments powered by Disqus