How does Apache know where to direct web requests?


Oct 1, 2013
cPanel Access Level
Reseller Owner
I'm new to cPanel, and Linux based hosting. Doing pretty good, but I can't figure this thing out:

I have as my primary domain; points to my primary IP. I also have an A record for pointing to my shared IP (which is different from my primary IP) - I (want to) use it for new website development, I can tell clients to go to, and they can see what I'm working on. That works fine, except, if you go to - you will get, by default the same content as ...

(I should also note - if I browse to I get the "Default Website Page" that comes with cPanel - which would be expected)

I could probably fix it, by deleting the A record, then creating a CNAME to point to a specific folder, but I don't really want to do that. Mainly, I want to understand how it works...

I tried to publish a website in the section of cPanel - I thought that would give Apache something to point to, but that didn't make a difference.

How does Apache know where to point web requests? If there's something wrong, what can I edit to fix it?
Also, (out of curiousity) how can a web request for the primary/root account by default point to an entirely different account's website (in this case, that of client2)?

Thanks to all who reply!


Staff member
Apr 11, 2011
Hello :)

Are you sure the shared IP address is not a dedicated IP or the only IP address assigned to an account? It's likely configured as a dedicated IP address. Thus, any attempts to access it directly, or to access websites pointing to it with no Virtual Host will point to the default cPanel page. Rather than setting up a manual "A" record for your subdomains, have you considered creating them as their own accounts or as subdomains under an existing account? You may also want to try rebuilding the Apache configuration file via:

Thank you.