Say my domain is foo.com and there is another domain bar.com. When people go to, say, xyz.foo.com - I want them to see bar.com. Is this possible to configure somehow. I think I've seen an option like this for some SaaS systems, but I can't recall which. This would be something done for white labeling, etc.
Use a CNAME record in your DNS zone file:
xyz.foo.com. CNAME bar.com.
Remember, MX and NS records cannot point to a CNAME. And your CNAME must always point to a domain, not an IP. Once you do this the alias "bar.com" cannot be used in any other resource records (like MX).