# Why is my main.css being served from http: instead of https:?

**URL:** <https://talk.jekyllrb.com/t/why-is-my-main-css-being-served-from-http-instead-of-https/3138>\
**Category:** Help\
**Created:** [July 28, 2019, 8:26pm UTC](https://talk.jekyllrb.com/t/why-is-my-main-css-being-served-from-http-instead-of-https/3138 "2019-07-28T20:26:34Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![mjmj](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/mjmj/32/518_2.png) [@mjmj](https://talk.jekyllrb.com/u/mjmj)\
**Post date:** [July 28, 2019, 8:26pm UTC](https://talk.jekyllrb.com/t/why-is-my-main-css-being-served-from-http-instead-of-https/3138/1 "2019-07-28T20:26:34Z")

</div>

I forked minimal-mistakes a couple years ago, and now I’m finally trying to force SSL on Github. When I go to the https version of my site, it seems to reference http://[site name]/assets/css/main.css instead of https:, and of course does not render properly.

I thought that I’d eliminated all http: references from \_includes and elsewhere. Any clues for me?

I’m considering trying to merge with the latest minimal-mistakes, but I expect that won’t be simple either.

Sorry if this has been covered before. I searched and didn’t notice any posts about this problem exactly.

---

<div class="post-metadata">

**Author:** ![rdyar](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/rdyar/32/710_2.png) [@rdyar](https://talk.jekyllrb.com/u/rdyar)\
**Post date:** [July 28, 2019, 8:30pm UTC](https://talk.jekyllrb.com/t/why-is-my-main-css-being-served-from-http-instead-of-https/3138/2 "2019-07-28T20:30:45Z")

</div>

do you have a link to the site? my guess is the http is hard coded somewhere, did you check the layouts too?

---

<div class="post-metadata">

**Author:** ![mjmj](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/mjmj/32/518_2.png) [@mjmj](https://talk.jekyllrb.com/u/mjmj)\
**Post date:** [July 28, 2019, 8:49pm UTC](https://talk.jekyllrb.com/t/why-is-my-main-css-being-served-from-http-instead-of-https/3138/3 "2019-07-28T20:49:06Z")

</div>

Yes, I switched all files in \_layouts to use https.

I found this in \_includes/head.html  
`<link rel="stylesheet" href="{{ '/assets/css/main.css' | absolute_url }}">`

So I guess I need to find out how mmistakes computes absolute\_url?

---

<div class="post-metadata">

**Author:** ![mmistakes](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/mmistakes/32/2169_2.png) [@mmistakes](https://talk.jekyllrb.com/u/mmistakes)\
**Post date:** [July 28, 2019, 9:50pm UTC](https://talk.jekyllrb.com/t/why-is-my-main-css-being-served-from-http-instead-of-https/3138/4 "2019-07-28T21:50:39Z")

</div>

`absolute_url` is a Jekyll construct. My guess is you need to setup your GH pages repo to force https and/or make sure `url` in your \_config.yml has a https:// protocol and not http.

[https://help.github.com/en/articles/securing-your-github-pages-site-with-https](https://help.github.com/en/articles/securing-your-github-pages-site-with-https)

Also since you noted using MM several years ago it’s worth making sure you’ve upgrades to latest version to rule that out as well. The theme absolutely works with https. The demo site is served on GitHub Pages that way.

---

<div class="post-metadata">

**Author:** ![mjmj](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/mjmj/32/518_2.png) [@mjmj](https://talk.jekyllrb.com/u/mjmj)\
**Post date:** [July 28, 2019, 11:01pm UTC](https://talk.jekyllrb.com/t/why-is-my-main-css-being-served-from-http-instead-of-https/3138/5 "2019-07-28T23:01:02Z")

</div>

FIXED. Thank you. Previously I had left `url` in \_config.yml blank for some reason – maybe I thought it would interfere with development on localhost:4000. With the `url` populated the site now works properly on GitHub Pages.

I will now set it up to force https.

Mr. Rose, I would like to take your latest version of minimal-mistakes some time, but I’ve been nervous about the effort to merge my changes back in.
