Help with 301 Redirection

Good morning,

After installing let’s encrypt using certbot, my domain name has stopped working for me. I have tried uninstalling certbot and reinstalling apache but it still doesn’t work. If I try to access through “curl http://cityfarmer.uab.cat” I receive a response, but if I enter through the browser it does not respond.

I am a student and the machine is a university computer for testing.

Thanks!

My domain is: cityfarmer.uab.cat
My web server is (include version): Apache
The operating system my web server runs on is (include version): Ubuntu Server 18.04
I can login to a root shell on my machine (yes or no, or I don’t know): yes
I’m using a control panel to manage my site (no, or provide the name and version of the control panel): no

Sounds like it might be trying to connect via the HTTPS port, 443. Perhaps due to a cached 301 redirect.

You don't have port 443 accessible on your server at the moment, so the browser would appear to hang and the page wouldn't load.

Try opening TCP port 443 on any firewalls.

I have not modified any firewall configuration. Before installing Let’s Encrypt I could perfectly access to http://cityfarmer.uab.cat, but after installing I can’t.

What files does Certbot modify when you tell it that you want the redirect (option “2”)?

Thanks!

Yes, but you need to.

HTTPS uses port 443.

HTTP uses port 80.

You only have 80 open, which means anybody visiting your site over HTTPS will be met with a blank loading screen.

That depends on your Apache configuration. You can probably locate it using:

grep -Ri RewriteRule /etc/{apache2,httpd}

But if I have removed certbot and reinstalled apache, why doesn’t http://cityfarmer.uab.cat still work and redirect me to https://cityfarmer.uab.cat?

How can I remove it?

Thanks for your quick response!

It doesn’t redirect me. Your browser has probably cached the 301 redirect - as it’s a “permanent” redirect.

You’re right! If I enter with private mode (in Chrome) it works.

Thank you so much for everything!

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