Adding both CNAME and TXT DNS records for one subdomain
You can't. As RFC1034 says in s3.6.2,
If a CNAME RR is present at a node, no other data should be present
If you want a TXT
record for (say) www.example.com
, you can't have a CNAME
for www.example.com
, and will have to find another way to achieve what you want. This may mean monitoring example.herokuapp.com
yourself, and when the IP address changes, updating your own A
records for www.example.com
.