Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When ever I install a website(in ubuntu server) I always need to add DNS manually by going to my server hosting cpanel. I want to automate it i.e. by executing a shell script which will automatically add CNAME in DNS Zone, How it could be possible.

share|improve this question
up vote 1 down vote accepted

I discovered that the only way to do it is to install our own DNS serve so that we can edit our zone file inside our server and add cnames. So, in this way we can write a shell script to automate the process of adding DNS each time we add content of a website. The best DNS server is BIND (Berkeley Internet Name Domain) .

Here are some useful links for BIND:

  1. Official page
  2. Wikipedia page
  3. How to Configure

Hope I helped others who are looking for solution to the problem same as me.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.