Problem with

Problem with
Centos 7 nginx + ssl
Did the installation through - sudo certbot --nginx
The certificate works.
Users from search engines go to
And the error is: 400 Bad Request The plain HTTP request was sent to HTTPS port nginx

Please share your domain name. There are too many potential causes for us to be able to help you by blind guessing.

Hi @vovckalexei

there is no such redirect visible

Domainname Http-Status redirect Sec. G 301 Html is minified: 108,54 % 0.063 A 301 Html is minified: 108,54 % 0.050 A 301 Html is minified: 108,54 % 3.280 F GZip used - 6410 / 15250 - 57,97 % Inline-JavaScript (∑/total): 0/0 Inline-CSS (∑/total): 0/0 200 Html is minified: 105,21 % 3.763 B

Two correct redirects http -> https, one wrong (https -> http), but without a port.

So it's an old, not longer valid entry -> ignore it.

Or use the Google console to remove the entry.

But searching I can't find such a link.

The answer is normal - http via a working https port is always http status 400 - Bad Request.

How to do it right (https -> http)?

What program tested the site for errors?

You have already a (wrong) redirect. Find that and modify it.

That's an own online tool

Created to make it easier to find errors in configurations. Most ideas are from this forum.

Help, I can not understand.
Everything was automatically registered for me when I installed the certificate.
Config File:

Please read your config file. There is your wrong redirect - on top.

I tried to change, but nothing worked. Correct what is wrong.

rewrite ^$request_uri? permanent;

listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot


Please read the documentation of

Don't use commands without knowing what they are doing. That's always wrong.

As soon as I haven’t tried, it doesn’t work, please help. What am I doing wrong?

return 301$request_uri;

What doesn't work?

What's the error?

How to fix?

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