Redirect apex to subdomain

Hello all. I’ve set my blog in github pages at https://blog.guilhermegarnier.com . But I’d like to make the apex guilhermegarnier.com (and maybe also www.guilhermegarnier.com) redirect to that subdomain.

I’ve already searched the docs and community for this situation, but I still can’t make it work. After setting in my DNS a CNAME for @ pointing to ggarnier.github.io, I get a 404 accessing https://guilhermegarnier.com/ . Does github pages support this kind of config?

Hi @ggarnier, welcome to the GitHub Support Community! GitHub only directly supports redirects for the www domain to the apex, or vice versa. GitHub can’t redirect from the apex or www subdomain to a different subdomain.

If you want to set up a redirect like this it’ll need to be set up with your DNS provider–if they support it. A lot of DNS providers support setting up redirects like this so I’d take a look at their documentation to see if you can enable this for your domains.