WHM redirect goes to old hostname

We recently changed the hostname of our server. After a deleting the DNS entry for the old hostname, I noticed that the following URL http://hostname.domain.com/whm/ redirects using the old hostname, and thus no longer works.

I would appreciate if someone could point me to where cPanel keeps the information about the hostname that it uses for redirects.

The recommended method for changing your hostname is to go to WHM and in the "Networking Setup" section, click the link for "Hostname." If you have not previously done this, you may want to attempt this to see if this resolves your issue.