Avoid "Success! Your new web server is ready to use", but redirect instead

Hi all,

I’m a new hestia-user, so please bear over with me if this is a stupid question. I have a godaddy-domain and am using hestia-cp to successfully control my web- and mail-server. The issue I have is that if I enter the domain, e.g. www.mydomain.com that works correct, but not if I enter the IP address directly, e.g. 148.113.101.130 (which is not the correct IP address but I prefer to not share the details of the website here). I would like to accomplish that if I enter the IP address directly, e.g. similar to 148.113.101.130 then I should see the exact same as if I visit www.mydomain.com (both in a browser).

Instead if I enter the IP-address, I see “Success! Your new web server is ready to use” and I found a related thread/discussion here: Change Default text in server: "Success! Your new web server is ready to use." - but I don’t just want to change the text… I found out that it’s probably just showing the contents of /var/www/html/index.html if I enter the IP address directly. Instead I think it should show the contents of e.g. /home/hestia_user/web/mydomain.com/public_html

In case my DNS-settings mean anything, they’re something along/similar to:

Type Name Data TTL

A @ 148.113.101.130 600 seconds
A hcp 148.113.101.130 600 seconds
A mail 148.113.101.130 600 seconds
A webmail 148.113.101.130 600 seconds
NS @ ns47.domaincontrol.com. 1 Hour
NS @ ns48.domaincontrol.com. 1 Hour
CNAME www mydomain.com. 1 Hour
CNAME _domainconnect _domainconnect.gd.domaincontrol.com. 1 Hour
SOA @ Primary nameserver: ns47.domaincontrol.com. 1 Hour
MX @ mail.mydomain.com. (Priority: 10) 1 Hour
and 4 lines of TXT (SMTP-forwarding stuff like _dmarc etc, shouldn’t be relevant so excluded here)

Could anyone please explain the proper way to show (redirect if needed) www.mydomain.com if the user inputs the IP directly, e.g. something like 148.113.101.130 ? Inside hestia-control-panel, I have a user “hestia_user” which manages a single web-domain. If I click “Edit Web Domain” for the “domain”-setting I have “mydomain.com”. Under the “Aliases”-setting I just have “www.mydomain.com” and then the “IP Address” setting is 148.113.101.130. I have tried to add “148.113.101.130” as a new line under “Aliases” but then hestia-cp complains with: “Error: DNS record for 148.113.101.130 does not exist” or similar, so it seems “Aliases” cannot be numeric…

I also read that upgrades could overwrite local changes so I’m hoping for a good solution that survives hestia-upgrades, what is it I don’t understand? Thanks for any hints/help!

Probaly the way to go: Redirect IP to Domain

Thanks a lot and thanks a lot for the reference. I’ll use this method although I can see some people think it’s a bad idea - but for me it’s fine, thanks!

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.