Directadmin redirects to ip address instead og hostname on http connection

Zagorax

Verified User
Joined
Jan 11, 2011
Messages
67
Hi,

I'd setup my directadmin control panel to use a custom ssl certificate and I've set force_hostname to match the domain associated with my certificate. Of course, it won't work if someone tries to connect to https://isownsite.com:2222 and he will get a waring and then a redirect.

But, if someone tries to connect on http, directadmin first redirects him to myip:2222 and so he will get the warning and only then it will redirect the user to the right domain.

You may try to go on http://www.openpost.it:2222 to understand what I mean. Isn't it possible to redirect http connection on port 2222 directly to the domain to bypass the warning?

Thanks
 
1. There is no way to do a ssl to ssl connection without getting a warning.

2. You should just use force_hostname. I have never seen it give any error or not work properly.
 
1. There is no way to do a ssl to ssl connection without getting a warning.

2. You should just use force_hostname. I have never seen it give any error or not work properly.

No, wait.

I've bought an SSL certificate and I can sse it working properly, without getting any warning here: https://www.hosting.francescoruvolo.it:2222

I've set DirectAdmin to force https connection. So, if I connect to port 2222 on http, it will redirect to https. But, it will redirect on https://158.58.168.96:2222 and not to the hostname set with force_hostname. It will supply the warning since the certificate is valid for www.hosting.francescoruvolo.com and not for the IP address itself. This is the defined behaviour, as stated on DirectAdmin help, too. And we can't do nothing as long as the user request an https connection on a domain which is not related with the certificate.

What I ask is: is it possibile to redirect http (with no SSL) connections directly to the domain pointed by force_hostname instead of redirecting it first to the IP address and only after to the domain?

If you try with the domain I've posted on the first post, you'll understand what I mean. You will get a warning, you will say Firefox to ignore the warning and now (only now) DA will redirect you to https://www.hosting.francescoruvolo.it:2222, which is the correct domain. Redirecting the user directly to it, instead of https://158.58.168.96:2222 would avoid the warning.
 
Back
Top