How to Connect a Squarespace Domain to a Website Hosted on GitHub Pages
Step-by-step for pointing a domain you registered through Squarespace at a site hosted on GitHub Pages: the CNAME file, the four A records for GitHub's IPs, the www CNAME, and the DNS propagation wait.
If you bought a domain through Squarespace but your actual site lives on GitHub Pages, connecting the two is a DNS exercise. It's not hard, but the exact records matter and Squarespace's defaults get in the way. This is the specific recipe.
The steps: add a file called CNAME to your repo's default branch containing just your domain, so GitHub Pages knows what to expect. Then, because Squarespace doesn't do CNAME flattening on a root domain, add four A records on @ pointing at GitHub's Pages IPs (185.199.108.153, .109.153, .110.153, .111.153), plus a CNAME on www pointing at your username.github.io address. Delete any conflicting default Squarespace records. Wait for propagation, which can be minutes or can be a day or two, and check with a tool like whatsmydns.net. Last, confirm GitHub Pages is building from the right branch and enable Enforce HTTPS once the certificate provisions.
Key takeaways
- Root domain needs A records, not a CNAME: Squarespace won't flatten a CNAME on the apex, so use the four GitHub Pages IPs directly;
wwwgets the CNAME - The repo's CNAME file and the custom domain field in Pages settings must agree, or Pages gets confused about which host it serves
- Remove Squarespace's default records first: leftover A or CNAME entries fight the new ones and cause intermittent failures
Who this is for
Anyone hosting a static site or project page on GitHub Pages who registered their domain with Squarespace and just needs the two to talk. No deep DNS knowledge required. Covers both user/organization sites and project repos.
The full walkthrough, with the exact record values and troubleshooting notes, is on DEV.to.