Skip to content
Nightscape Coffee edited this page Jun 10, 2021 · 10 revisions

Questions: How do I set a custom domain?


GitHub Pages and Moonrise make using your own domain fast and easy.


1. Setting up GitHub

First, you need to direct GitHub Pages (which is hosting Moonrise) to point to the custom domain name you own. Follow this guide to make sure your DNS settings and GitHub repo settings are set up properly.

Managing a custom domain for your GitHub Pages site (GitHub)


2. Setting up Moonrise

In Moonrise's _config.yml file, these are the first 5 lines:

# Set this website's info
# Change "coffeebank" to your GitHub username
# Change "moonrise" to your repository name
url: "https://coffeebank.github.io"
baseurl: "/moonrise"

The way this code works is that there is a domain (url) setting, and a folderpath (baseurl) setting, for if you want to host Moonrise on a https://domain.com/folderpath formatted domain.

To host it on your own domain.com itself, change the settings to as follows, replacing "yourcustomdomain" with your custom domain:

url: "https://yourcustomdomain.com"
baseurl: ""

Make sure that the "url" field does NOT have a / at the end.

Clone this wiki locally