Howie Howie - 3 months ago 22
Apache Configuration Question

Log redirections from alias domain (cPanel shared hosting)

I want to measure how many requests goes through aliasdomain.com (and its subdomains) to see whether the purchase of aliasdomain.com was justified.

I've bought two domains: maindomain.com and aliasdomain.com. In cPanel I've set aliasdomain.com as the alias domain to the maindomain.com. In .htaccess I've set a permanent redirection.

In cPanel I have the following modules enabled for both domains: Visitors, Raw Access, Webalizer and Awstats. I also have shell access.

I've checked them all but it seems it only logs the maindomain.com requests, but not the aliasdomain.com for some reason. I can't even select it from the drop-down menu.

Answer Source

Well you should remove aliasdomain.com from your cPanel account and add it as an addon domain. Then do the required redirection and you will be able to check the access logs for both main domain and alias domain. The way you have added aliasdomain as an alias, it just points to the main domain and cPanel is not seeing it as another domain so you won't be able to see any stats collected by awstats or any other similar tool.

Remove the domain from cPanel, re-add it as an addon domain and you should be good to go.