Site not showing on http but showing on https

Hello team,

When I enter my site URL it is showing 404 Not Found nginx/1.18.0 (Ubuntu).

I want to redirect my site HTTP to HTTPS on Nginx server can you help me regarding this issue?


Submit an 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,

It sounds like that your Nginx server block for port 80 is missing. You can add the following Ngin server block with a 301 redirect to achieve the HTTP to HTTPS redirection:

server {
    listen 80;

    # redirects both www and non-www to https
    return 301$request_uri;

I’ve also noticed that your website is already working as expected, if you are not seeing the correct results, make sure to clear your browser history.

Hope that this helps! Best, Bobby