Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

Slicehost DNS Script

I found the SliceManager to be a little time consuming when creating multiple DNS records for multiple domains. This ruby script interfaces with Slicehost's API to add the basic DNS records for a domain.

If you need DNS entries other than (or instead of) those that come with the script (see below), it should be fairly easy to open the script and modify the records to your liking.


  • There's just a single file (slicedns.rb). Get it.
  • Get an API key from your SliceManager at:
  • Open the script and replace "your_api_key_goes_here" with your API key.
  • Save the script.
  • Make sure the script is executable by you: chmod 744 slicedns.rb
  • Run the script (see 'Usage' below).


./slicedns.rb slice_name

There are two required arguments for the script. The first is the name of your slice. The second is the domain name (with trailing period [.]).

The script will create a zone with the DNS records shown below. It will ask you if you want to also create the Google Apps records.

If the zone already exists, you will be prompted to Cancel or Overwrite the existing records. Choosing overwrite will delete the whole zone (including any custom records you have previously set up) and start from scratch.

DNS Records Created

The following records will be created in the zone:                    A       [your slice's IP]
*                  A       [your slice's IP]
                                   NS                    NS                    NS

If you respond with Y to "Add records for Google Apps? [Yn]" the following will also be created:                    MX      10 ASPMX.L.GOOGLE.COM.                    MX      20 ALT1.ASPMX.L.GOOGLE.COM.                    MX      20 ALT2.ASPMX.L.GOOGLE.COM.                    MX      30 ASPMX2.GOOGLEMAIL.COM.                    MX      30 ASPMX3.GOOGLEMAIL.COM.                    MX      30 ASPMX4.GOOGLEMAIL.COM.                    MX      30 ASPMX5.GOOGLEMAIL.COM.
mail                            CNAME
start                           CNAME
docs                            CNAME
calendar                        CNAME  SRV      5 0 5269  SRV     20 0 5269  SRV     20 0 5269  SRV     20 0 5269  SRV     20 0 5269       SRV      5 0 5269       SRV     20 0 5269       SRV     20 0 5269       SRV     20 0 5269       SRV     20 0 5269


A ruby script for automatically creating DNS records for Slicehost Slices






No releases published


No packages published