Map subdomain of main site's domain to branch deployment

I have a project at project-name.com and a branch deployment at preview.project-name.pages.dev. I'd like to make this specific branch deployment accessible via preview.project-name.com. Is that possible?

What I've tried: I added preview.project-name.com as a custom domain, and then modified the CNAME record to point to preview.project-name.pages.dev instead of project-name.pages.dev. But it still takes me to project-name.pages.dev; I'm not seeing the preview deployment version.
Was this page helpful?