# How do I show two Jekyll blogs on one domain?

**URL:** https://talk.jekyllrb.com/t/how-do-i-show-two-jekyll-blogs-on-one-domain/9352
**Category:** Help
**Created:** [July 31, 2024, 1:46pm UTC](https://talk.jekyllrb.com/t/how-do-i-show-two-jekyll-blogs-on-one-domain/9352 "2024-07-31T13:46:33Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![jimken123](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/jimken123/32/6026_2.png) [@jimken123](https://talk.jekyllrb.com/u/jimken123)
#### Post date: [July 31, 2024, 1:46pm UTC](https://talk.jekyllrb.com/t/how-do-i-show-two-jekyll-blogs-on-one-domain/9352/1 "2024-07-31T13:46:33Z")

</div>

Hi there, I can’t find a ‘howto’ for this, so here goes…

In my attempt to liberate my old blog from Wordpress and to start a new blog as well, I have built two Jekyll blogs in two different repos:

1. /jimken123/ohpiglet displaying on GitHub Pages as /ohpiglet/
2. /jimken123/nu-blog displaying on GitHub Pages as /nu-blog/

I own [mydomain.com](http://mydomain.com) and I want to serve the two blogs as follows:

1. /nu-blog/ → mydomain
2. /ohpiglet/ → mydomain/ohpiglet

Q1. Is this possible from two repos or do I need to merge them? I’d prefer to keep them separate.  
Q2. Should I use subdomains instead?  
Q3. Is there a better way I haven’t seen?

---

<div class="post-metadata">

### Author: ![BillRaymond](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/billraymond/32/5963_2.png) [@BillRaymond](https://talk.jekyllrb.com/u/BillRaymond)
#### Post date: [July 31, 2024, 2:45pm UTC](https://talk.jekyllrb.com/t/how-do-i-show-two-jekyll-blogs-on-one-domain/9352/2 "2024-07-31T14:45:53Z")

</div>

Hello,

If you plan to separate old content from new content, you could create a folder structure just as you suggest. Here’s a video I made a few years back that walks you through that “folder” method:

[![](https://canada1.discourse-cdn.com/flex030/uploads/jekyllrb/original/2X/4/4a83f4b275a325e45860bdf5c0e6a12c0d5cc416.jpeg "Up and Running with GitHub Pages, Part 6, Multiple Jekyll Blogs and Feeds") ](https://www.youtube.com/watch?v=iIBkOWY5aAA)

After you watch this video and try it out, you will understand how to lay out your site, and you might have more questions.

If you care about Google search rankings, you must carefully consider whether to retain the original site URLs for your old blog. If you create a brand new site with brand new URLs for your blog, then Google will treat that as “new” and not a “replacement,” so you will have to rebuild Google’s search engine trust again.

If you are unfamiliar with Jekyll site development, you might want to start with the first video in my [series](https://youtu.be/EvYs1idcGnM) and watch through to the “multiple blogs and feeds” video I share above.

Also, I mention GitHub Pages a lot here, but most of this is generic Jekyll stuff, so do not worry if you are not limited to just GitHub Pages.

---

<div class="post-metadata">

### Author: ![jimken123](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/jimken123/32/6026_2.png) [@jimken123](https://talk.jekyllrb.com/u/jimken123)
#### Post date: [August 1, 2024, 9:33am UTC](https://talk.jekyllrb.com/t/how-do-i-show-two-jekyll-blogs-on-one-domain/9352/3 "2024-08-01T09:33:31Z")

</div>

Thanks Bill! I think my usecase is somewhat different to yours in that my two blogs are completely different ((themes, configs, everything) - one is based on { Personal } Jekyll Theme and the other on Forever Jekyll. So a second \_posts folder inside the first \_post folder won’t be nearly enough, it will be more like an entire repo inside another repo, and that will get very messy very quickly…

---

<div class="post-metadata">

### Author: ![BillRaymond](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/billraymond/32/5963_2.png) [@BillRaymond](https://talk.jekyllrb.com/u/BillRaymond)
#### Post date: [August 1, 2024, 1:17pm UTC](https://talk.jekyllrb.com/t/how-do-i-show-two-jekyll-blogs-on-one-domain/9352/4 "2024-08-01T13:17:07Z")

</div>

Could you please explain what you use those two different blogs for and why they should be together but separate? By keeping Jekyll out of this for the moment, we can better understand your requirements and help you define a solution.

---

<div class="post-metadata">

### Author: ![jimken123](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/jimken123/32/6026_2.png) [@jimken123](https://talk.jekyllrb.com/u/jimken123)
#### Post date: [August 1, 2024, 1:42pm UTC](https://talk.jekyllrb.com/t/how-do-i-show-two-jekyll-blogs-on-one-domain/9352/5 "2024-08-01T13:42:28Z")

</div>

Sure! The main blog is about my kids, to keep in touch with my mother because we live abroad. It has ~4000 posts going back 14 years. The other one is new, intended for me talking about politics, books, whatever. So different audiences.

They are both already in Jekyll, one as a migration from WP and the other new.

‘Together’ because:

- both will be served on my existing domain name.

‘but separate’ because:

- different audiences.
- built completely differently.

For clarification they are here:

> **[ohpiglet](https://jimken123.github.io/ohpiglet/)**
>
> Three monkeys we found up a tree and a woodland creature of the forest floor

> **[manaña...](https://jimken123.github.io/nu-blog/)**
>
> Blog and website of Jim Kennedy.

---

<div class="post-metadata">

### Author: ![bewuethr](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/bewuethr/32/4611_2.png) [@bewuethr](https://talk.jekyllrb.com/u/bewuethr)
#### Post date: [August 5, 2024, 8:04pm UTC](https://talk.jekyllrb.com/t/how-do-i-show-two-jekyll-blogs-on-one-domain/9352/6 "2024-08-05T20:04:22Z")

</div>

If you set up [jimken123.github.io](http://jimken123.github.io) to use your custom domain, ohpiglet will automatically show up under [yourdomain.com/ohpiglet:](http://yourdomain.com/ohpiglet:)

> **[About custom domains and GitHub Pages - GitHub Docs](https://docs.github.com/en/pages/configuring-a-custom-domain-for-your-github-pages-site/about-custom-domains-and-github-pages#using-a-custom-domain-across-multiple-repositories)**
>
> GitHub Pages supports using custom domains, or changing the root of your site's URL from the default, like octocat.github.io, to any domain you own.

Make sure to configure `baseurl` correctly to include `/ohpiglet`, or all relative links will be messed up.

---

<div class="post-metadata">

### Author: ![BillRaymond](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/billraymond/32/5963_2.png) [@BillRaymond](https://talk.jekyllrb.com/u/BillRaymond)
#### Post date: [August 6, 2024, 1:09pm UTC](https://talk.jekyllrb.com/t/how-do-i-show-two-jekyll-blogs-on-one-domain/9352/7 "2024-08-06T13:09:07Z")

</div>

I think @bewuethr is providing you with the best solution here.

---

<div class="post-metadata">

### Author: ![jimken123](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/jimken123/32/6026_2.png) [@jimken123](https://talk.jekyllrb.com/u/jimken123)
#### Post date: [August 12, 2024, 11:31am UTC](https://talk.jekyllrb.com/t/how-do-i-show-two-jekyll-blogs-on-one-domain/9352/8 "2024-08-12T11:31:49Z")

</div>

This unfortunately didn’t work from two repos.

---

<div class="post-metadata">

### Author: ![jimken123](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/jimken123/32/6026_2.png) [@jimken123](https://talk.jekyllrb.com/u/jimken123)
#### Post date: [August 12, 2024, 12:00pm UTC](https://talk.jekyllrb.com/t/how-do-i-show-two-jekyll-blogs-on-one-domain/9352/9 "2024-08-12T12:00:25Z")

</div>

So, here’s what I figured out from the replies here (thanks!), a lot of stackoverflowing, and a lot of trial and error.

If you want to pipe two repos (for example, foo and bar) to one website, there are three ways to do it:

1. Move one repo inside the the other one as a folder, so you have foo and foo/bar. Then ‘call’ each folder to a different url in the website, for example, foo → [mydomain.com/](http://mydomain.com/) and foo/bar → [mydomain.com/bar](http://mydomain.com/bar). I didn’t actually try this because it would be huge folders in my case, a maintenance nightmare, and there would be possible conflicts with competing index pages, config files, css, etc.

2. Submodules. Retain the repos foo and bar, but set up bar as a submodule inside foo. I didn’t actually try this way because it seems to be a maintenance headache afterwards, and tricky to push the correct repo updates.

3. Subdomains. Rename foo repo to [my-github-name.github.io](http://my-github-name.github.io), retain the bar repo. Custom domain [my-github-name.github.io](http://my-github-name.github.io) → [mydomain.com](http://mydomain.com). Set up the subdomain [bar.mydomain.com](http://bar.mydomain.com) and custom domain bar → [bar.mydomain.com](http://bar.mydomain.com). This works pretty much out of the box.

So in my case I have:

jimken123/jimken123.github.io → [https://mananamanana.com](https://mananamanana.com)  
jimken123/ohpiglet → [https://ohpiglet.mananamanana.com](https://ohpiglet.mananamanana.com)  
jimken123/dublinopinion → [https://dublinopinion.mananamanana.com](https://dublinopinion.mananamanana.com)  
…etc…

Now to figure out the remaining problem of \_posts ignoring css…

---

<div class="post-metadata">

### Author: ![bewuethr](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/bewuethr/32/4611_2.png) [@bewuethr](https://talk.jekyllrb.com/u/bewuethr)
#### Post date: [August 12, 2024, 2:29pm UTC](https://talk.jekyllrb.com/t/how-do-i-show-two-jekyll-blogs-on-one-domain/9352/10 "2024-08-12T14:29:09Z")

</div>

How did it “not work”? I have this exact setup operational.

---

<div class="post-metadata">

### Author: ![jimken123](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/jimken123/32/6026_2.png) [@jimken123](https://talk.jekyllrb.com/u/jimken123)
#### Post date: [August 12, 2024, 2:57pm UTC](https://talk.jekyllrb.com/t/how-do-i-show-two-jekyll-blogs-on-one-domain/9352/11 "2024-08-12T14:57:22Z")

</div>

Can you link me to your repos please? I’d like to have a look.

---

<div class="post-metadata">

### Author: ![bewuethr](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/bewuethr/32/4611_2.png) [@bewuethr](https://talk.jekyllrb.com/u/bewuethr)
#### Post date: [August 12, 2024, 3:17pm UTC](https://talk.jekyllrb.com/t/how-do-i-show-two-jekyll-blogs-on-one-domain/9352/12 "2024-08-12T15:17:33Z")

</div>

The setup with Jekyll running on both types of repos is in an Enterprise org and not public, but here’s an example of two repos with the same URL structure:

- [https://github.com/bewuethr/bewuethr.github.io](https://github.com/bewuethr/bewuethr.github.io) lives at [https://benjaminwuethrich.dev/](https://benjaminwuethrich.dev/)
- [https://github.com/bewuethr/vr-toybox](https://github.com/bewuethr/vr-toybox) lives at [https://benjaminwuethrich.dev/vr-toybox/](https://benjaminwuethrich.dev/vr-toybox/)
