Managing DNS Records For The People With Cloudflare Apps

Cloudflare Railgun is available when using Cloud Server Webuzo, Cloud Web Apps. Contact us to find out our latest offers!

Managing DNS Records For The People With Cloudflare Apps

DNS records are hard.  Many people, even the technically competent, don’t bother to learn more than the basics.

Managing DNS Records For The People With Cloudflare Apps

You could be one of them — someone who learns just enough about DNS to get it working, then immediately forgetting everything until the next time it breaks — and the vicious cycle continues.  The definition of insanity comes to mind. Meanwhile, non-technical folks wisely avoid meddling in such dangerous psychology.

Surely, there must be a better way (this is a blog post after all).

A new feature allows Cloudflare Apps to set up configurable DNS records on more than 12 million registered domains on the Cloudflare network. Cloudflare Apps are here to alleviate the internet’s collective DNS woes.  Gone are the days of tribulating over whether it’s A or CNAME you should set.  Gone are the days of puzzling between A and AAAA records while wondering what the heck happened to AA and AAA records???  Unload your DNS dysphoria onto highly trained developers experienced at explicating these burdensome questions today!

Are you a highly trained developer?  Install Pointless DNS on your site to try out the new feature.  This pointless app installs a TXT record on any root or subdomain of your choice.  

Managing DNS Records For The People With Cloudflare Apps
I set the TXT record name to “blog” during installation

Once installed, head over to your DNS dashboard and you’ll see the app doing its thing.  If you really want, you can uninstall it from your Installed Apps page.

Managing DNS Records For The People With Cloudflare Apps
Pointless DNS manages its pointless record on my blog subdomain

To start building an app, download create-cloudflare-app and open it in your preferred text editor.  Below, I’ll explain how Pointless DNS manages configurable DNS records.

In the install.json file, you’ll find a dns field that looks like this:

# install.json

"dns": [{
    "type": "TXT",
    "content": "Managed TXT Record",
    "name": "Created by create-cloudflare-app",
    "ttl": 120
  }]

This says a TXT record will be set up and managed on the app installer’s site, which can only be modified or deleted through the app’s configuration page.  An app can create or modify any type of Cloudflare DNS record available in Cloudflare’s DNS API.

Now let’s add in some configuration. Add an install option and point it at your record — options.subdomain will be set to the installer’s desire.

# install.json

{
  "options": {
    "properties": {
      "subdomain": {
        "order": 1,
        "type": "string",
        "title": "TXT Record Subdomain",
        "description": "The subdomain of your DNS record",
        "placeholder": "*Required - e.g. [your_domain].com",
        "required": true
      }
    }
  },
  "dns": [{
    "type": "TXT",
    "name": "{{options.subdomain}}",
    "content": "{{options.subdomain}} was set"
  }]
}

Check out the Cloudflare Apps docs to learn more about about building DNS apps.  For additional inspiration, consider Mailchannels — a powerful email security solution that manages DNS records to fight off pesky spammers and phishermen.

Managing DNS Records For The People With Cloudflare Apps

DNS records used to be hard, but a new breed of Cloudflare Apps makes them easy.  Cloudflare Apps-based DNS configuration gives developers the opportunity to be the hero people want and the hero they need.

Cloudflare Railgun is available when using Cloud Server Webuzo, Cloud Web Apps. Contact us to find out our latest offers!

Comments are closed.