Report this

What is the reason for this report?

Automatic Site redirecting

Posted on March 1, 2022

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.



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!

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.

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

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.