Delete any A/AAAA/CNAME records for firstdomain.com in your DNS.
All You need is
AAAA @ 100:: Proxied
Go to Rules -> Redirect Rules -> Create Rule
Give it a name like "redirect to closets"
Stick with the default Wildcard pattern option
Request URL:
https://firstdomain.com/*
Target URL:
https://seconddomain.com/${1}
Preserve Query String