Skip to content

DNS configuration

After delegating your own domain to our DNS servers, you can proceed to configuration. Changing records is available from the admin panel or after logging in to SSH with the command: devil dns.

Warning

When adding a website in the DevilWEB panel, the DNS support option has not been unchecked (located in the advanced settings), skip this configuration.

DevilWEB

After logging in to the administration panel, DNS management can be found in the DNS zones tab. After clicking, a list of DNS zones is shown. You can change the entries for each domain.

DNS Zones

Adding a domain

To add a domain, click + Add new zone. You must enter the domain. In advanced settings you can choose which e-mail records should be added.

Add DNS Zone

Edit records

After clicking the Edit button, a list of records for a given domain appears.

Edit DNS Zone

To add a new record, click + Add new record and select the type and complete the remaining fields.

Add new DNS entry

Devil

Configuration of DNS records is also possible from the SHELL level using the devil dns module.

Adding and deleting a record

Adding a DNS record is done with one of the following commands:

devil dns add DOMAIN
devil dns add DOMAIN RECORD RECORD_TYPE TARGET [TTL]
devil dns add DOMAIN RECORD RECORD_TYPE PRIO TARGET [TTL]
devil dns add DOMAIN RECORD RECORD_TYPE PRIO WEIGHT TARGET [TTL]

where the arguments are:

  • DOMAIN - domain name
  • RECORD - DNS record
  • RECORD_TYPE - record type: A, AAAA, CNAME, MX, NS, SRV, TXT
  • TARGET - content of the record (IP address or domain, depending on the selected type)
  • TTL - TTL of the DNS record
  • PRIO - Record priority
  • WEIGHT - Weight of the record

To remove a domain from the DNS zone, use the command: devil dns del DOMAIN
Deleting a record is done with the command: devil dns del DOMAIN RECORD_ID

List of domains and records

To get a list of domains in the DNS zone, use the command: devil dns list
A list of records with id numbers can be obtained with the command:
devil dns list DOMAIN

Templates

The list of templates is available with the command: devil dns templates. To apply the selected template, use the command devil dns add DOMAIN DNS_TEMPLATE
Where DOMAIN is a domain name and DNS_TEMPLATE is the name of the template.

Examples

  • Creating a new zone:
    devil dns add example.com

  • Adding the A record to the domain:
    devil dns add example.com example.com A 1.2.3.4

  • Adding a subdomain with a different A record address:
    devil dns add example.com subdomain.example.com A 5.6.7.8

  • Deleting the record (record ID obtained from devil list example.com):
    devil dns del example.com 12345

  • Delete entire zone:
    devil dns del example.com

  • Adding records to Google Mail (GMail):
    devil dns add example.com googlemail

or:

devil dns add example.com example.com MX 1 ASPMX.L.GOOGLE.COM 3600
devil dns add example.com example.com MX 5 ALT1.ASPMX.L.GOOGLE.COM 3600
devil dns add example.com example.com MX 5 ALT1.ASPMX.L.GOOGLE.COM 3600
devil dns add example.com example.com MX 10 ALT3.ASPMX.L.GOOGLE.COM 3600
devil dns add example.com example.com MX 10 ALT3.ASPMX.L.GOOGLE.COM 3600

See also

DNS Record Types
SPF