DNS API commands


The DNS API module allows you to manage your domain's DNS records. The following options are available.

View the following article for instructions on how to connect to the DreamHost API. You will use the instructions in this article to construct your API call.


The dns-list_records command lists all DNS records for all domains on all accounts you have access to. This command will not list records in the following cases:

Running the command

The following command lists all DNS records for all domains in your account.



The dns-add_record allows you to add a new DNS record to a domain (excluding dreamhosters.com subdomains).

After adding a record, it will still take several hours to propagate online.

Running the command

You must specify the following values when running this command.

  • record : The domain name you are adding the record to (example.com)
  • value : The DNS record's value.
  • comment : Optional comment for this record.

The following command adds a TXT record with a value of test123 to the domain example.com.



This is the opposite of dns-add_record. The same values must be specified when running the command. The following command removes a TXT record with a value of test123 from the domain example.com.


See also

Did this article answer your questions?

Article last updated PST.

Still not finding what you're looking for?