How to recognize specific host name for Visual hosts?


Apr 20, 2019
cPanel Access Level
Root Administrator

Current my website is hosted on a dedicated server with cPanel. Users can visit my website via or

Now I need to use my website as the origin and use Amazon Cloudfront distribution for it as a CDN. Amazon Cloudfront does not allow to use an IP address as the origin, neither can I use or as the origin domain, since they will point to the distribution after I setup the Cloudfront distribution.

So I add a new A record in the DNS zone editor, i.e. -> of the dedicated server)

And then take as the origin domain.

Now the problem is that Cloudfront will include the following header to the request:


And I cannot modify the header.

And then such a Host header is passed to my server, it seems that the server cannot accept the Host as a valid host name for and will always return 404 error below:

"The server cannot find the requested page"

" (port 443)"

So now what I need to do is to let to be another valid host name for, just like How to do so?

Last edited by a moderator:


Jurassic Moderator
Staff member
Oct 19, 2014
cPanel Access Level
Root Administrator
Hey there! You'd want to either create a subdomain (separate web content) or an alias (points to already-existing web content) through cPanel. In order to that, you'd do the following:

-delete the DNS entry you have already created
-log in to cPanel for the domain
-go to Aliases
-create the domain/subdomain you'd like to use

Can you try that and see if that gets things working how you expect? More details on that can be found here: Aliases | cPanel & WHM Documentation