Unable to access Rocket chat via CNAME

I am trying to set up a rocket chat server for our university. I have done the installation via snaps (Ubuntu 20.04)and followed the steps provided in https://docs.rocket.chat/installation/snaps

The rocket chat server is up and running and I am able to access it on a particular domain
But the issue is I am not able to access it via CNAME pointing to the root domain

Can you please help how can I access the rocket chat server via CNAME?

Thanks in advance.

Mastodon