---
title: "Discussion on \"Route HTTP to HTTPS [NGINX]\" | Hashnode"
description: "Discussion on \"Route HTTP to HTTPS [NGINX]\". There is no magic here, just add the below to your Nginx config file\nserver {\n    listen 80 default_server;\n\n    server_name _;\n\n    return 301 https://$host$request_uri;\n}\nIt is a server block that listens to the default port, and works for every se..."
url: "https://hashnode.com/posts/route-http-to-https-nginx/5f209f3ded20ff21a11e7ae1"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Route HTTP to HTTPS \[NGINX\]](https://sys.limistah.dev/route-http-to-https-nginx?utm_source=hashnode&utm_medium=feed)

There is no magic here, just add the below to your Nginx config file server { listen 80 default\_server; server\_name \_; return 301 https://$host$request\_uri; } It is a server block that listens to the default port, and works for every se...

Jul 28, 2020 · 1 min read · sys.limistah.dev  
Read the article

## Written by

[Aleem Isiaka](https://hashnode.com/@limistah)

@limistah · Lagos, Nigeria

  
[View profile](https://hashnode.com/@limistah)

Carefully getting things done.

Developer and Builder 🔨⚒️⚙️

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
