Question

I cant access my website I always get redirected to rrot

Hi I need help, i just installed certbot after that im unable to access my website i always get redirected to root, please help i tried removing cerbot but still the same issue


Submit an answer


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.

KFSys
Site Moderator
Site Moderator badge
March 23, 2020
Accepted Answer

Hi @Xunne,

It seems you have redirection in place. Depending on the WebService you are using - Apache/Nginx this can be in a different place. We’ll review both situation

  • Nginx

Firstly, you’ll need to learn how block learn in Nginx. There is a really good tutorial from DigitalOcean here -

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

Once you know where and what blocks are used for you can check the Let’s Encrypt installation with Nginx

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

It will show you how to secure it.

Now onto the problem itself. Check the Nginx configuration for your website/application and see if there are multiple redirections placed. If there are multiple ones, you’ll need to remove at least one.

  • Apache

Now, Apache doesn’t have blocks but there are vhosts. If you are unsure how to configure them, you can check how here, again a tutorial by DigitalOcean

https://www.digitalocean.com/community/tutorials/how-to-install-the-apache-web-server-on-ubuntu-18-04

Once you now how to configure Vhosts, you can see how to configure Let’s Encrypt by reviewing the following article :

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

Now, Apache can have two places where the problem may be experienced. The first one would be your vhost file, you can have some redirection rules there.

The second place is your website’s .htaccess file. Check if there are any redirection to https.

  • Website

The last place you should look would be your website and see if there is any redirections set there.

Now, we won’t be able to help with the website however if you are unsure, you can post the configuration file of your WebService and we’ll try to help out.

Regards, KDSys

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Featured on Community

Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.

Become a contributor

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow — whether you're running one virtual machine or ten thousand.

Learn more