So Long to Redirect!
For some time, I was avoiding setting up a personal site, and only using my domain for email routing. Once I decided to actually put a content presence on the web, I liked how I could use my GitHub account to host it. Like many people, I initially took the easy route: I set up a DNS redirect from my root domain to my GitHub Pages URL. It worked, but it never felt quite right. The browser would visibly redirect to a github.io address, which made the site feel less polished and, frankly, less trustworthy.
I decided to fix that by pointing my domain directly to GitHub Pages using proper DNS records instead of relying on forwarding. The first step was cleaning up the default DNS configuration in Squarespace. Their “default” records can conflict with custom setups, so I removed anything that could interfere with external hosting.
Next came the key change: configuring apex A records. I added four A records pointing my root domain (@) to GitHub’s IP addresses (185.199.108.153 through 185.199.111.153). This allows the root domain to resolve directly to GitHub’s infrastructure instead of bouncing through a redirect.
After that, I configured a CNAME record for the www subdomain, pointing it to my GitHub Pages hostname (myusername.github.io). This ensures both the root domain and the www version resolve cleanly and consistently.
On the GitHub side, I set the custom domain in my repository settings and enabled HTTPS once DNS propagation completed. There was also an optional verification step using a TXT record, which GitHub may require to confirm domain ownership.
The result was exactly what I wanted: when users visit my site, the URL stays on my domain with no visible redirect. It feels seamless and significantly more professional.
Beyond aesthetics, this setup also avoids issues with crawlers and services that don’t handle redirects well. Instead of appearing as a forwarded or “thin” site, my content is now properly rooted at my domain.
The biggest takeaway is that DNS forwarding is a shortcut, not a solution. With a small amount of extra configuration, you can create a much cleaner and more credible presence. And once it’s set up, it just works.