Question

Automatic Site redirecting

When I try to access my site via https://site1.com/, it redirects to https://site2.com/ which are hosted in the same digital ocean droplet. It’ll be ok? After restoring the backup it becomes ok,but after some time it redirects automatically.


Submit an answer
Answer a question...

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Bobby Iliev
Site Moderator
Site Moderator badge
July 5, 2022

Hi there,

I could suggest a few things:

  • Make sure that there is a virtual host created for each website as described here:

https://www.digitalocean.com/community/tutorials/how-to-set-up-apache-virtual-hosts-on-ubuntu-16-04

  • Make sure that you have an SSL certificate installed for each website as described here:

https://www.digitalocean.com/community/tutorials/how-to-secure-apache-with-let-s-encrypt-on-ubuntu-20-04

In case that you are still seeing the redirect even after having separate virtual hosts for each website, feel free to share the config files here so I could advise you further.

Best,

Bobby