I came across the question of a DNAME record and whether it could be used to redirect a website. I was not aware of a DNAME record type in DNS so I went looking. It’s a mapping comparable to a CNAME but more broad.
CNAME
A Canonical Name (CNAME) record is a type of resource record in the Domain Name System (DNS) that maps one domain name (an alias) to another.
The CNAME record is present in every DNS that I am aware of.
Example
For example, a CNAME on www.example1.com pointing to www.example2.com will link www.example1.com to www.example2.com.
This does not affect any other subdomain on example1.com.
DNAME
The DNAME resource record is used in the Domain Name System to delegate authority for a specific subzone to another domain. Unlike CNAME, which only applies to a single hostname, DNAME applies to all hosts subordinate to that hostname.
Support for DNAME records is currently limited. As of January 2024, Azure DNS Zones and Cloudflare DNS do not support DNAME records.
Example
For example, a DNAME on example1.com pointing to example2.com will link blog.example1.com to blog.example2.com.
Including any other subdomain on anything.example1.com to anything.example2.com