Page 1 of 1

Problem: Multiple Domains forward to the same domain

Posted: Wed Jul 03, 2019 8:57 pm
by bgbs
When I setup domains in Vesta, the domains always go to the first website I setup by default. This only happens on HTTP. When I switch to HTTPS, the example.com does go to the correct website. Why is this, and how do I prevent this from happening?

Perhaps there is a conf file somewhere that needs editing?

Re: Problem: Multiple Domains forward to the same domain

Posted: Mon Jul 08, 2019 6:37 pm
by albert
There could be several causes. However, it is very likely that you have some SSL cert issues that might be causing these redirects. Have you got more information... are you using Vesta for DNS, htaccess for redirects or other services?

Re: Problem: Multiple Domains forward to the same domain

Posted: Fri Sep 13, 2019 5:12 pm
by bgbs
I'm using nginx only, no dns in vesta. I manage dns through cloudflare, which supplies my ssl certificate as well

Re: Problem: Multiple Domains forward to the same domain

Posted: Fri Sep 20, 2019 5:14 pm
by xstocler
I have the same problem.
DNS use by cloudflare and when accessing the domain redirects to the other.
When I enable https in cloudflare to force the use of SSL it accesses the correct address.

Re: Problem: Multiple Domains forward to the same domain

Posted: Fri Sep 27, 2019 7:19 pm
by SanTi
Have you solved the problem? I have 5 domains on one ip. I have VPS Centos. Nginx and VestaCp installed. I was using domains without any error. I changed NS of one domain with cloudflare's an I have controlled it on cloudflare. I removed website on cloudflare and now I cant enter domains via http:// .

Re: Problem: Multiple Domains forward to the same domain

Posted: Tue Oct 01, 2019 11:58 am
by xstocler
SanTi wrote:
Fri Sep 27, 2019 7:19 pm
Have you solved the problem? I have 5 domains on one ip. I have VPS Centos. Nginx and VestaCp installed. I was using domains without any error. I changed NS of one domain with cloudflare's an I have controlled it on cloudflare. I removed website on cloudflare and now I cant enter domains via http:// .

In cloudflare on SSL / TLS tab> Edge-certificates
You have the options to force the use of https to do so.


- Always Use HTTPS - ON/OFF
- Automatic HTTPS Rewrites - ON/OFF

Re: Problem: Multiple Domains forward to the same domain

Posted: Tue Oct 08, 2019 5:06 am
by hsvesta
This might be due to incorrect HSTS configuration for Apache or Nginx

E.g. on Nginx this
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains; preload"
will redirect all the HTTP example.com or sub.example.com to HTTPS example.com

Better change this to
add_header Strict-Transport-Security "max-age=31536000; preload" always;

Make sure that the Apache or Nginx configuration for HTTP are not redirecting to HTTPS, if not needed.

Re: Problem: Multiple Domains forward to the same domain

Posted: Sun Sep 06, 2020 4:45 pm
by kitty
bgbs wrote:
Wed Jul 03, 2019 8:57 pm
When I setup domains in Vesta, the domains always go to the first website I setup by default. This only happens on HTTP. When I switch to HTTPS, the example.com does go to the correct website. Why is this, and how do I prevent this from happening?

Perhaps there is a conf file somewhere that needs editing?
i was able to solve this same issue by changing the cloudflare SSL settings to flexible.

"Your SSL/TLS encryption mode is Flexible"