Alternatives to Hairpin NAT/split DNS - reaching HTTP server from the same subnet using domain

Hello, after following the https://help.mikrotik.com/docs/spaces/RKB/pages/154042388/Port+forwarding guide, I’m able to access my HTTP server from the Internet using my domain. Now, when trying to access the HTTP server using the domain from the local network (same subnet of the HTTP server) I reach my MikroTik router web ui instead.

I heard of the hairpin nat or split dns (and I already have a PiHole DNS server) technique but was wondering what suits best my case.
Also I would like to have the most dynamic thing possible (like allowing me to add port forwarding rules without changing a lot of settings).

What do you suggest?

It does make sense (in my opinion) to have this handled by DNS. All traffic doesn’t have to pass the router that way.

And what about Wireguard traffic, having a domain like: wireguard.mydomain.com? It can be handled still from DNS?

add chain=dstnat action=dstnat src-address=serverSUBNET dst-address=serverSUBNET

What’s should that do?

A.k.a the hairpin NAT rule

And what if I have multiple vlans? Do I need to use address lists?

It’ll make your life easier, so yes

Scripting is the only way to define the address lists automatically based on my existing vlans?

Using Hairpin NAT is the best option for this purpose.

Hairpin nat is only required if the users are in the same subnet as the server.
So I would make a hairpin nat rule specific to each subnet.
The format provided allows for any number of servers within a subnet.