DNS Management by Code

Hello,

I currently have a VPS with RDP at my provider CWH, but my domains are with GoDaddy with A-Records pointing to CWH; and Emails with Microsoft Exchange.  Whenever I need to create a subdomain, I first log into GoDaddy create a new A-Record, then log into Plesk at CWH and create my sub domain there.  

As I’m releasing anew service, I’m hoping to automate this, so I had the following questions.

1.      Can I host my own DNS on my VPS? I

a)      If yes, could I use an API or SDK to create and delete A-Records?

b)      If no, do you know if GoDaddy or another provider has such interface?

2.      Within Plesk, or IIS directly, how can I Create/Suspend/Delete subdomains… again by code? Plesk is PHP-based, so there must be a way.

Obvoiusly my VPS is IIS, but can get Linux.

Any advice would be appreciated.
APD TorontoSoftware DeveloperAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

aranaCommented:
if you have it on IIS you can use powershell WebAdministration module to manage sites, and yes you can manage your dns also from powershell (must be a windows server). regarding goddady im not sure they offer that service but I believe they wont allow you to remove anything from their DNs server
Casey WeaverManaged Services Windows Engineer IIICommented:
Set up a windows server with the DNS role and use it as an authoritative name server for your domain. You can then use powershell to automate DNS changes. https://4sysops.com/archives/managing-dns-records-with-powershell/  as for plesk, you can integrate your master script that's doing the powershell changes to also contact your Linux plesk server. And either edit httpd.conf with the new data and issue an Apache service restart or use the rewrite method so that the sub domain is available without restarting the service.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
VB Script

From novice to tech pro — start learning today.