Setting Up A Box Using Namecheap and Digital Ocean

I have a domain on namecheap that hosts my web app, lets say www.ultrawebapp.com
I want a subdomain that will be used by for MIAB, lets say mail.ultrawebapp.com

I have created the ‘glue records’ in namecheap. I have installed the MIAB software on my digital ocean droplet.

Nameserver config:
mank.ns.cloudflare.com
marnk.ns.cloudflare.com
ns1.mail.ultrawebapp.com
ns2.mail.ultrawebapp.com

DNS records:
ns1.mail 123.456.78.90
ns2.mail 123.456.78.90

The problem is when i visit mail.ultrawebapp.com/admin, it does not show me the MIAB interface. But when visiting the droplets ip address, i see the MIAB interface.

Similar issue on this forum

I have read the above thread and tried the solutions suggested but to no avail.

What must I do?

Using both Cloudflare’s and your own nameserver concurrently doesn’t really work unless you manually synchronize them. Cloudflare probably doesn’t know about the mail subdomain. You should use either (preferably) MIAB for all DNS services for the domain or Cloudflare as external DNS configured in MIAB.

You can run dig @123.456.78.90 mail.ultrawebapp.com A on an external machine to see what’s going on. It should resolve the address to the desired ip and show the nameservers in the other sections.

1 Like

Hey thanks a bunch.
I rather cloudflare as external dns because of the current architecture of my apps.
Does this mean I have to go to cloudflare and add the subdomain and ip of the droplet?
If there is another option too please show me how to go about it.

EDIT: this is the output of the dig command:

~$ dig @123.456.78.90 mail.ultrawebapp.com A

; <<>> DiG 9.18.28-0ubuntu0.22.04.1-Ubuntu <<>> @123.456.78.90 mail.ultrawebapp.com A
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 57372
;; flags: qr aa rd; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 3
;; WARNING: recursion requested but not available

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 1232
;; QUESTION SECTION:
;mail.ultrawebapp.com.			IN	A

;; ANSWER SECTION:
mail.ultrawebapp.com.		86400	IN	A	123.456.78.90

;; AUTHORITY SECTION:
ultrawebapp.com.		86400	IN	NS	ns1.mail.ultrawebapp.com.
ultrawebapp.com.		86400	IN	NS	ns2.mail.ultrawebapp.com.

;; ADDITIONAL SECTION:
ns1.mail.ultrawebapp.com.	86400	IN	A	123.456.78.90
ns2.mail.ultrawebapp.com.	86400	IN	A	123.456.78.90

;; Query time: 259 msec
;; SERVER: 123.456.78.90#53(123.456.78.90) (UDP)
;; WHEN: Mon Oct 21 21:22:57 WAT 2024
;; MSG SIZE  rcvd: 127

You have to go to MIAB admin page and >> Use External DNS and replicate all the DNS entries listed there, in your Cloudflare. It is painful but once it is setup it should be OK.

1 Like

The output looks right, assuming the ip there is the same as your miab instance’s public ip. It is possible that if it (randomly) selects a different nameserver it’ll yield no or a different ip instead.