Admin

DNS Templates

How to create and use DNS templates to pre-populate records when new domains are added.

Last updated 1775606400

DNS templates define the default set of records that Opterius creates when a new domain is added to the server. Instead of manually adding the same records to every new account (e.g., your Google Workspace MX records, custom SPF policy, or a CNAME for a CDN), you define them once in a template.

Default Template

Opterius ships with a default template that creates:

  • SOA record
  • NS records (using your configured nameservers)
  • A record for the root domain → server IP
  • A record for www → server IP
  • A record for mail → server IP
  • MX record → mail.{domain}, priority 10
  • TXT/SPF record → v=spf1 a mx ~all

This default is sufficient for most hosting setups.

Creating a Custom Template

  1. In Server Mode, go to Settings → DNS Templates
  2. Click New Template
  3. Give it a name (e.g., "Google Workspace", "Standard + CDN")
  4. Add records using the same interface as the per-domain DNS editor
  5. Use {domain} as a placeholder — it's replaced with the actual domain when the template is applied

Example — template entry for a CNAME pointing to a CDN:

  • Name: static.{domain}
  • Type: CNAME
  • Value: cdn.yourservice.com

Example — Google Workspace MX records in a template:

  • Name: @, Type: MX, Value: aspmx.l.google.com, Priority: 1
  • Name: @, Type: MX, Value: alt1.aspmx.l.google.com, Priority: 5
  • Name: @, Type: TXT, Value: v=spf1 include:_spf.google.com ~all

Assigning a Template to an Account

When creating an account, you can select which DNS template to apply. The template's records are created along with the default account records.

You can also apply a template to an existing account from Server Mode → Accounts → [account] → DNS → Apply Template.

Multiple Templates

You can have multiple templates for different account types — e.g., one for clients using your mail server, one for clients using Google Workspace, one for clients using Cloudflare. Select the right template at account creation time.

Next Steps