# HTTPS works but canonical links are still pointing to HTTP

**URL:** <https://forum.ghost.org/t/https-works-but-canonical-links-are-still-pointing-to-http/4723>\
**Category:** Installation\
**Created:** [December 29, 2018, 11:59pm UTC](https://forum.ghost.org/t/https-works-but-canonical-links-are-still-pointing-to-http/4723 "2018-12-29T23:59:20Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![buremba](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/buremba/32/1916_2.png) [@buremba](https://forum.ghost.org/u/buremba)\
**Post date:** [December 29, 2018, 11:59pm UTC](https://forum.ghost.org/t/https-works-but-canonical-links-are-still-pointing-to-http/4723/1 "2018-12-29T23:59:20Z")

</div>

I’m using Ghost 2 and the installed URL is [Analyze Your Customer Data in a Seamless Way, Looker Alternative | rakam.io](https://rakam.io/blog)

If you can see the source of the webpage, the canonical urls are pointing to [Analyze Your Customer Data in a Seamless Way, Looker Alternative | rakam.io](http://rakam.io/blog) which is incorrect. The reason is that the value of `url` config is [Analyze Your Customer Data in a Seamless Way, Looker Alternative | rakam.io](http://rakam.io/blog) but if I update it to [Analyze Your Customer Data in a Seamless Way, Looker Alternative | rakam.io](https://rakam.io/blog) it doesn’t work since Ghost doesn’t support SSL itself. When I point url to HTTPS and try to load the url, it redirects to [https://35.202.68.150/blog](https://35.202.68.150/blog) which is the source url and it doesn’t load since it doesn’t support SSL.

I need to use NGINX to be able to install it to our landing page without messing up the homepage. Any suggestions?

---

<div class="post-metadata">

**Author:** ![vikaspotluri123](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/vikaspotluri123/32/24_2.png) [@vikaspotluri123](https://forum.ghost.org/u/vikaspotluri123)\
**Post date:** [December 30, 2018, 12:08am UTC](https://forum.ghost.org/t/https-works-but-canonical-links-are-still-pointing-to-http/4723/2 "2018-12-30T00:08:04Z")

</div>

When you configure Ghost to use an SSL url, you need to make sure nginx is configured to tell ghost it terminated the SSL connection. It sounds like you’re using a custom nginx configuration - can you check that the nginx rules in the [template](https://github.com/TryGhost/Ghost-CLI/blob/master/extensions/nginx/templates/nginx-ssl.conf) are present in your `/blog` nginx config?

---

<div class="post-metadata">

**Author:** ![buremba](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/buremba/32/1916_2.png) [@buremba](https://forum.ghost.org/u/buremba)\
**Post date:** [December 30, 2018, 5:15pm UTC](https://forum.ghost.org/t/https-works-but-canonical-links-are-still-pointing-to-http/4723/3 "2018-12-30T17:15:46Z")

</div>

@vikaspotluri123 thanks for the answer. We actually switched to Netlify recently and here is the redirects rule that we’re using:

```auto
[[redirects]]
  from = "/blog/*"
  to = "http://35.202.68.150/blog/:splat"
  status = 200
  headers = {X-Forwarded-For = "35.202.68.150", X-Forwarded-Proto = "https", Host = "https://rakam.io", X-Real-IP: "35.202.68.150"}
  force = true

```

The `url` setting of the Ghost is also updated and unfortunately [Analyze Your Customer Data in a Seamless Way, Looker Alternative | rakam.io](https://rakam.io/blog) redirects to [https://35.202.68.150/blog](https://35.202.68.150/blog) at the moment even though the value of Ghost settings `url` is `https://rakam.io/blog`.

How does Nginx tell Ghost that it terminated the SSL connection? I can set new headers as you can see in Netlify redirects but I still couldn’t figure out how to do it without using Nginx.

---

<div class="post-metadata">

**Author:** ![vikaspotluri123](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/vikaspotluri123/32/24_2.png) [@vikaspotluri123](https://forum.ghost.org/u/vikaspotluri123)\
**Post date:** [December 30, 2018, 6:19pm UTC](https://forum.ghost.org/t/https-works-but-canonical-links-are-still-pointing-to-http/4723/4 "2018-12-30T18:19:06Z")

</div>

What netlify means by redirect is sending your user from one location to another - for example, `http://ghost.org` =\> `https://ghost.org`.

Netlify does not work as a reverse proxy, which is what nginx is used for, and what you’re trying to do. For `/blog`/, your redirect should just contain

```auto
from = "/blog/*"
to = "https://rakam.io/blog/:splat"

```

But you should be aware that it’s not possible to point a domain to 2 separate locations (i.e. netlify AND your ghost instance)

---

<div class="post-metadata">

**Author:** ![jojo786](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/jojo786/32/270_2.png) [@jojo786](https://forum.ghost.org/u/jojo786)\
**Post date:** [January 2, 2019, 6:05am UTC](https://forum.ghost.org/t/https-works-but-canonical-links-are-still-pointing-to-http/4723/5 "2019-01-02T06:05:34Z")

</div>

I have the same setup: ghost not using HTTPS. But HTTPS really is a requirement nowadays, especially with chrome not serving or complaining about http.  
So I use cloudflare to do SSL offloading. Setup a free cloudflare account, configure DNS, then have cloudflare provide HTTPS, but connect http only to your blog.

---

<div class="post-metadata">

**Author:** ![buremba](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/buremba/32/1916_2.png) [@buremba](https://forum.ghost.org/u/buremba)\
**Post date:** [January 2, 2019, 6:37pm UTC](https://forum.ghost.org/t/https-works-but-canonical-links-are-still-pointing-to-http/4723/6 "2019-01-02T18:37:42Z")

</div>

Do you mind sharing the blog url with me? If you’re using HTTP in Ghost setting called `url`, that’s also not optimal since in HTML source Ghost will use HTTP canonical links.

---

<div class="post-metadata">

**Author:** ![jojo786](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/jojo786/32/270_2.png) [@jojo786](https://forum.ghost.org/u/jojo786)\
**Post date:** [January 4, 2019, 7:16am UTC](https://forum.ghost.org/t/https-works-but-canonical-links-are-still-pointing-to-http/4723/7 "2019-01-04T07:16:13Z")

</div>

I use docker, so when I start the container, I specify url as http, like this:

docker run -d --name ghost-v2.1.3-1 -p 4431:2368 --restart always -v /home/yusufm/gitwork/ghost-data-v1:/var/lib/ghost/content -e url=[Hacksaw - The Blog](http://hacksaw.co.za/blog/) ghost:2.1.3

That will expose everything as HTTP, so you dont need to worry about certs and SSL.  
Then setup your domains on CloudFlare, and under crypto, set:  
SSL: Flexible  
Always use HTTPS: On

This will then make all requests to your domain reach cloudflare. CF will use Flexible SSL, so everything to CD will be HTTPS, but plain HTTP to your ghost server: [https://support.cloudflare.com/hc/en-us/articles/200170416-What-do-the-SSL-options-mean-](https://support.cloudflare.com/hc/en-us/articles/200170416-What-do-the-SSL-options-mean-)

And with Always use HTTPS, CF wil convert even non-HTTPS to HTTPS: [https://support.cloudflare.com/hc/en-us/articles/200170536-How-do-I-redirect-all-visitors-to-HTTPS-SSL-](https://support.cloudflare.com/hc/en-us/articles/200170536-How-do-I-redirect-all-visitors-to-HTTPS-SSL-)

---

<div class="post-metadata">

**Author:** ![buremba](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/buremba/32/1916_2.png) [@buremba](https://forum.ghost.org/u/buremba)\
**Post date:** [January 4, 2019, 9:54pm UTC](https://forum.ghost.org/t/https-works-but-canonical-links-are-still-pointing-to-http/4723/8 "2019-01-04T21:54:56Z")

</div>

Hey there, I have looked into your blog but it looks like the canonical links are still pointing to the HTTP. I started to believe that the maintainers intentionally made it hard to maintain your own Ghost instance. Even though the software itself is cool, they don’t support Docker officially, it doesn’t play well with Heroku or any system other than custom Nginx. All that makes sense since they want to monetize their software and make money from their managed solution. However; I can’t afford $200 plan and I don’t think it’s worth that much.

I moved all the posts to Hugo, installed Ghost theme ([https://themes.gohugo.io/hugo-casper-two/](https://themes.gohugo.io/hugo-casper-two/)) setup [Forestry.io](http://Forestry.io) as an admin panel and now we have [Analyze Your Customer Data in a Seamless Way, Looker Alternative | rakam.io](http://rakam.io/blog) in static pages hosted on Netlify for free.

For the record, we were paying $29 to Ghost previously.

---

<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:** [January 18, 2019, 9:55pm UTC](https://forum.ghost.org/t/https-works-but-canonical-links-are-still-pointing-to-http/4723/9 "2019-01-18T21:55:01Z")

</div>

Closed on January 18, 2019, 9:55pm UTC

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