It should work even on a trial. The confusing part about adding a custom domain name, though, is that you have to “reset” the fediverse identity on Account → View Fediverse Details. This essentially deletes the old account from Mastodon servers and sets it up again using your new domain name.
Let us know if that doesn’t work!