How do I check if the URL accessing the page is the original URL or if it\'s a CNAME record.
For example, I have a site domain.com. Users can setup a CNAME
domain.com
I think you have to query a DNS to know it, since this information does not usually come in request headers.
Take a look at the dns_get_record and checkdnsrr functions in PHP documentation.