Never ask again: Wait, why did I create this TXT record? 🤔 Introducing Notes for DNS Records! 👀 Read more

Manage all your domains using Ruby

We've got the best API to manage your domain portfolio while saving time and money.

A quick tour of our Ruby API in under 9 minutes.

A quick tour of our Ruby API in under 9 minutes.

Fast and easy to use.

Quickly check domain availability, add a DNS record, and request an SSL certificate directly from Ruby.

Never regretted signing up long ago.

Marius Maximus, DevOps

Configuring server-wide DNS template is made simple for our Enterprise Network with DNSimple.

Rithika G., Cloud Engineer

A dependable service with amazing technical support.

Valters J., DevOps Engineer

Best DNS Hosting Company by far.

Dorian Kind, Director of Data & Technologies

Case studies

Learn how our customers use DNSimple to automate their companies' domain management — from registering domains and adding zone records, to reselling domains and managing cloud infrastructure.

Fun Fact

DNSimple was launched at RubyConf 2010.
The Ruby language has a very special place in our hearts.
We're happy to be part of this community.

Developer tips

Open a free account in our Sandbox environment. Write, test, and verify your code before you move to production.

Test domain registration and issuing SSL certificates at no charge. Domains registered in Sandbox do not resolve, and SSL certificates should not be installed in any production environment.

Use our testing credit card to select a plan that matches the features that you'd like to test.

Follow this guide to obtain your token for your API calls.

Create an account in Sandbox

Start by writing small scripts that explore how you can use the API. Writing a custom report is a good way to get exposure to different API endpoints and how you can combine those.

# Print my domains with expiration date and associated SSL certificate if any.

require "dnsimple"

dnsimple =
    base_url: "",
    access_token: TOKEN
domains =
domains.each do |domain|
  print " - #{}:  #{domain.state} "
  if domain.state == 'registered'
    print "(expires on: #{domain.expires_at})"
  certificates = client.certificates.certificates(account_id,

  unless certificates.empty?
    certificates.each do |certificate|
      print "       - #{certificate.common_name}: #{certificate.state} (years till expiry: #{certificate.years} "
      if certificate.auto_renew
        print "but will auto renew"
      print ")"

Managing domains with similar configurations can be error prone. Use the Ruby API to automate DNS changes accross multiple domains with DNS templates.

In the script below, we've created a template to apply to any domain after registration.

# Point a domain to hosting after registration

require "dnsimple"

dnsimple =
    base_url: "",
    access_token: TOKEN

# Creates a new template
template = dnsimple.templates.create_template(
    name: "Domain registration template",
    short_name: "after-domain-registration-template",
    description: "Point a domain to hosting after registration"

# Adds A record to template
    name: "a",
    type: "A",
    content: "",
    ttl: 600

# Register the domain. Omits contact logic for this example.
domain = dnsimple.registrar.register_domain(

# Apply the template to the registered domain
dnsimple.templates.apply_template(account_id, template,

Reliable DNS at the right price

If you manage 100+ domains, get in touch.
We offer flexible plans with adjusted rates and discounts for Enterprise and Resellers.

Every time you bundle,
you're using DNSimple.

We partner with Rubygems so you can bundle install your projects every time.

Enjoy the same secure, reliable service today.

Manage your domains from Ruby.