If you are looking to redirect traffic from a subdomain to the root domain, you’ll need to create a proxied DNS A record for the subdomain. The A record can point to any IP address because all traffic is already redirected before reaching the address. You could also use bulk redirects. You’ll need to use subpath matching and preserve match suffix to ensure that the traffic is directed properly.