Markus Löning

Software Engineering & Machine Learning

Configuring a custom domain with Github Pages and Squarespace

Posted at Dec 28, 2023 11:52:52 — Last modified at Jan 1, 2024 17:49:00

To show my website on my custom domain, I had to configure GitHub Pages, my static site hosting service, and Squarespace, my domain hosting service.

Luckily, the GitHub Pages and Squarespace docs were easy to follow. This blog post was also helpful.

1. Configure custom domain for GitHub Pages

Follow the Github Pages docs for configuring a custom domain.

2. Configure Squarespace DNS settings for GitHub Pages

To point our Squarespace domain to our GitHub Pages site, make these changes to the Squarespace DNS settings:

For more details, see the Squarespace docs on pointing to a non-Squarespace site.

It can take up to 72 hours for your new configuration to take effect. While you wait, you can check your domain’s progress across the internet by using

Once your changes have propagated, you should be able to navigate to your custom domain and see your <user> content. You can also check that the DNS check on the GitHub Pages page of your repository settings is successful.

3. Verify custom domain for GitHub Pages

To secure your custom domain from takeovers, you can add a TXT record.

To generate the TXT host name and value, follow the GitHub Pages docs for verifying a custom domain. Then add the TXT record to the Squarespace DNS settings, using the host name and value provided during the GitHub Pages verification process.

Note that the host name does not include your domain name. In my case, the host name is _github-pages-challenge-mloning, without the domain name. For details, see the Squarespace docs on adding a TXT record.

Again, it can take up to 72 hours for the new DNS configuration to take effect. Once the changes have been propagated, you can complete the domain verification on GitHub.