Click on IP > Hotspot > Walled Garden.
Click on the + sign to add the desired host or domain to the Dst. Host in this format:
Please note that in this case, all subdomains of domain.com is whitelisted, but domain.com itself is not. Please check point #2 below.
Don't forget to restart the router and wait a few minutes! Sometimes DNS queries are cached and wildcard names have to be queried again otherwise they won't work.