# Https site url and redirect loop

**URL:** <https://forum.ghost.org/t/https-site-url-and-redirect-loop/3051>\
**Category:** Developer help\
**Created:** [September 13, 2018, 7:17am UTC](https://forum.ghost.org/t/https-site-url-and-redirect-loop/3051 "2018-09-13T07:17:12Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![enoter](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/enoter/32/1243_2.png) [@enoter](https://forum.ghost.org/u/enoter)\
**Post date:** [September 13, 2018, 7:17am UTC](https://forum.ghost.org/t/https-site-url-and-redirect-loop/3051/1 "2018-09-13T07:17:13Z")

</div>

When I change the URL of my blog to https:// i get

**… redirected you too many times.**  
**Try clearing your cookies.**

My nginx config:

```
server {
    server_name ....;
	listen .;
    return 301 https://_$request_uri;
}

server {
    listen .:443 ssl;
	server_name .....;
	
	ssl_certificate .....
    ssl_certificate_key .....
	
	 location / {
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header HOST $http_host;
        proxy_set_header X-NginX-Proxy true;

        proxy_pass http://127.0.0.1:2369;
        proxy_redirect off;
    }
}

```

I cant understand how fix it 😟

I need this for change sitemap url.

---

<div class="post-metadata">

**Author:** ![Kevin](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/kevin/32/32_2.png) [@Kevin](https://forum.ghost.org/u/Kevin)\
**Post date:** [September 13, 2018, 10:31am UTC](https://forum.ghost.org/t/https-site-url-and-redirect-loop/3051/2 "2018-09-13T10:31:38Z")

</div>

@enoter you’re missing headers that are required for Ghost to work, the `X-Forwarded-Proto` one is especially important for SSL. You can see the [template Ghost-CLI uses](https://github.com/TryGhost/Ghost-CLI/blob/master/extensions/nginx/templates/nginx-ssl.conf) for the full list of required headers.

I would suggest using Ghost-CLI if possible.

---

<div class="post-metadata">

**Author:** ![enoter](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/enoter/32/1243_2.png) [@enoter](https://forum.ghost.org/u/enoter)\
**Post date:** [September 13, 2018, 5:31pm UTC](https://forum.ghost.org/t/https-site-url-and-redirect-loop/3051/3 "2018-09-13T17:31:09Z")

</div>

Thanks for your help 😌

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex015/uploads/ghost2/original/2X/b/ba9ce5100b8bb264586f4f572545596b2ce3f081.png) [@system](https://forum.ghost.org/u/system)\
**Post date:** [September 27, 2018, 5:31pm UTC](https://forum.ghost.org/t/https-site-url-and-redirect-loop/3051/4 "2018-09-27T17:31:21Z")

</div>

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