Skip to main content

Redirecting to ip address instead of server hostname

Comments

18 comments

  • kodeslogic
    Is your hostname is still resolving to the server IP address?
    0
  • cPanelWilliam
    Hi! I agree with @kodeslogic, checking where your hostname resolves would be a good first step to troubleshooting this. If your hostname does not resolve directly to the server, it can cause the type of behavior you mentioned. For example, we've seen this issue come up when a client proxied their hostname behind CloudFlare.
    0
  • charliecres
    Is your hostname is still resolving to the server IP address?

    yes, my hostname is still resolving the server IP address. my hostname is working perfectly with SSL. only facing this redirecting issue when clients try to log in to their cPanel control panel from the client area (WHMCS).
    0
  • kodeslogic
    You need to check the inputs for WHMCS >> System Settings >> Servers >> Click on EDIT for your cPanel server. Make sure you have your hostname set correctly for the Hostname field.
    0
  • charliecres
    there is no issue from the side of WHMCS. i have tested this on multiple WHMCS. same error. note: there are other servers configured at same WHMCS. and all are working perfectly without that one server.
    0
  • retechpro
    there is no issue from the side of WHMCS. i have tested this on multiple WHMCS. same error. note: there are other servers configured at same WHMCS. and all are working perfectly without that one server.

    You are using hetzner server?
    0
  • charliecres
    You are using hetzner server?

    no, GoDaddy! the issue has been fixed after cPanel update.
    0
  • nuwanr99
    I am also facing the same issue any solutions BTW my server is from hetzner
    0
  • Takito
    Same here. I transferred all accounts from the old server to the new one, then swapped IPs and then changed hostnames (along with other settings) so the new server was exactly the same as the old one. But WHMCS redirects me to the IP instead of the hostname now. I tried to change redirects in Tweak Settings and running this command, no luck. whmapi1 sethostname hostname=server.example.org
    0
  • retechpro
    Same here. I transferred all accounts from the old server to the new one, then swapped IPs and then changed hostnames (along with other settings) so the new server was exactly the same as the old one. But WHMCS redirects me to the IP instead of the hostname now. I tried to change redirects in Tweak Settings and running this command, no luck. whmapi1 sethostname hostname=server.example.org

    Try run this command and let me know if issue not solved. /scripts/upcp "force
    0
  • Takito
    Try run this command and let me know if issue not solved. /scripts/upcp "force

    Still the same :/
    0
  • retechpro
    Still the same :/

    mostly issues resolved using this command. I have solved lot of server issues by running this update command. if you are running Hetzner server then mostly issue happens. I am also facing the issue on my Hetzner servers. Due to this i am using custom hooks for whmcs.
    0
  • cPRex Jurassic Moderator
    I wouldn't expect a upcp to change anything related to the WHMCS redirects, as those aren't handled by cPanel. I am not personally familiar with WHMCS, but is the URL wrong in that application or are you being redirected to the wrong location after you click it?
    0
  • Takito
    I wouldn't expect a upcp to change anything related to the WHMCS redirects, as those aren't handled by cPanel. I am not personally familiar with WHMCS, but is the URL wrong in that application or are you being redirected to the wrong location after you click it?

    But the problem is that I didn't change anything at WHMCS, except the new API token to the server. The settings in WHMCS have an IP and hostname of the server. Which are set properly. Before, when you press in the client/admin area "login to cPanel" it redirected you to I have a few WHMCS installations and all are the same. Is there any way to redirect Because when you use
    0
  • cPRex Jurassic Moderator
    Yes, that would be handled in WHM >> Tweak Settings under the "redirection" tab. Just choose the "hostname" option from that list.
    0
  • Takito
    Yes, that would be handled in WHM >> Tweak Settings under the "redirection" tab. Just choose the "hostname" option from that list.

    Thank you. Doesn't help, unfortunately, as mentioned before :( SS attached.
    0
  • SimpleSonic
    Thank you. Doesn't help, unfortunately, as mentioned before :( SS attached.

    Which version of WHMCS are you using?
    0
  • charliecres
    Thank you. Doesn't help, unfortunately, as mentioned before :( SS attached.

    try to update your cPanel... it should work. (Worked for me)
    0

Please sign in to leave a comment.