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.
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:
Hope I helped others who are looking for solution to the problem same as me.