Connecting a custom domain to your SIMMER.io game
This article will explain how to hook a custom domain – such as http://myawesomegame.com to a game that you host on SIMMER.
You'll need three things:
You must purchase your own domain name outside of SIMMER--they usually cost about $12/yr. I personally recommend Google Domains or GANDI.net.
Github
Github pages is used as the connector to SIMMER custom domains. Here's how to set it up:
Go to https://github.com/TheRoccoB/simmer-custom-domain and click "Fork":

In your forked project, click the "index.html" link:

Then select the pencil to edit:

Replace the title and script tag with the appropriate values. You can find the script tag in SIMMER in your game's "edit" page (my uploads => edit game):

Click "Commit Changes". After commit, click "settings":

Scroll down to "Github pages" and select "master branch":

After switching Github pages to the master branch, you'll need to scroll down again to the Github pages section to get your URL:

If you click that link, your game should load up from SIMMER:
[TODO image]
Excellent! The first step is done and now we have to connect your internet domain to the game.
Connecting the domain!
At this point you'll need to register a domain if you haven't already done so. These instructions will use Google Domains, but all domain registrars have similar options.
Back in Github pages settings add your custom domain:

In your github project, select and edit the CNAME file to also add your domain there:


Go to your registrar and manage the domain:

The technical term for what we'll do next is "Manage DNS settings". If you're having trouble finding this, Google for "[RegistrarName] DNS Settings". For instance, if you use Godaddy, you could search for "Godaddy DNS Settings".
In Google domains this is oddly hidden in a section called "Use Custom Name Servers for your Domain". Go to this section:

Scroll down to the section "Custom Resource Records":

Here you'll Add "A" records for domain (these are also sometimes called ANAME or ALIAS)

Add the following IP addresses to the list using the small plus button on the right and click Save. Leave the other fields alone (Blank name tells the DNS that this is your top level domain and not a subdomain, and TTL means Time to Live).
185.199.108.153
185.199.109.153
185.199.110.153
185.199.111.153

The Waiting Game
Sometimes this works pretty quickly and sometimes you have to wait up to 24 hours. This is because your domain name settings are propagating to servers all around the world.
But after some time you should have connected your custom domain to Github and your game should be live on the internet!
You can check that your domain is working:

Congratulations your game now has a shiny new domain name!