cPanel is used on shared hosting when many websites use the same server and the same shared IP address. When you simply ask for the IP address, your host does not know which of the many hosted sites you want. This is the reason your host returns a 404 error. There are several ways to work around this problem.
Use a subdomain for your origin
You can change your origin server to use a different host name. In cPanel, you can accomplish this by modifying the main domain. So, your original server was
example.com but in the future, it could be
origin.example.com. You must add DNS records for this subdomain that point to the same IP address of the server. Then point the
www.example.com save to your proxy server and configure your proxy server proxy
It would also be a good idea to put canonical tags in your pages with your favorite hostname (
example.com do not
origin.example.com) so that if the search engines find the non-proxy version, they do not index it.
Configure your proxy to send a
Host on your mind
Queries that specify your origin server by IP address (
18.104.22.168 for example) should simply be upgraded with the domain name to use. The configuration for this depends on the proxy software you are using. If you use Apache with mod_proxy, you can use the
ProxyPass "https://webmasters.stackexchange.com/" "http://22.214.171.124/"
ProxyPassReverse "https://webmasters.stackexchange.com/" "http://126.96.36.199/"
RequestHeader set Host www.example.com
Use your / etc / hosts file
On your proxy server, you can replace DNS for example.com. You want to configure your proxy server to proxy
http://www.example.com and change your
/etc/hosts file to have the IP address of your original server (
188.8.131.52 for example).
184.108.40.206 example.com www.example.com