cPanel Redirecting To Wrong Hostname

robobobo

Member
Jan 4, 2013
15
0
1
cPanel Access Level
Website Owner
Hey guys,

So after a reboot of my server, the hostname went back to the default mydomain.localdomain which I then changed it to what it used to be server1.mydomain.com and it was working fine

But then I found that when I typed in a domain on the server, ie. mydomain:2083 it would redirect to the old hostname (mydomain.localdomain.com) instead of server1.mydomain.com

I have deleted any record of the old hostname and I have A records for the server1.mydomain.com hostname. I also double checked etc/hosts and etc/sysconfig/network and they're both right so what's happening?

I do also have an SSl cert installed by the way, but this has been working for months prior to all this

Cheers
 

MaestriaNick

Well-Known Member
Aug 6, 2008
159
3
68
hostname setup correctly in the WHM too ? (Networking setup >> Change Host name )
 

robobobo

Member
Jan 4, 2013
15
0
1
cPanel Access Level
Website Owner
Ye it is as well, when I change the cpanel settings for SSL redirection to "Certificate Name" it goes to the right place, but for "Hostname" it goes back to that default one again! Very confused!
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,202
363
Hello :)

Is this a VPS? If so, you will need to ensure the hostname for this VPS is configured properly at the VPS node level. This will ensure the correct hostname is used each time the VPS is restarted.

Thank you.