How to make GitHub Pages and Vercel subdomain work at the same time?

Hi everyone,

I’ve been using my GoDaddy domain (luishenrique.space) for GitHub Pages, where I accessed my repos through URLs like luishenrique.space/reponame. Everything was working fine until I decided to add a subdomain (e.g., myproject.luishenrique.space) for a project hosted on Vercel.

Adding the DNS configuration to GoDaddy:

TYPE NAME VALUE
CNAME myproject cname.vercel-dns.com

After adding the domain to Vercel, my GitHub Pages site stopped working, and now I’m being redirected to a GoDaddy landing page (luishenrique.space/lander).

Does anyone know how I can fix this and get both my GitHub Pages and Vercel subdomain working at the same time? Any advice would be really helpful!

Thanks!

Hello and welcome, @luisnws. This sounds like a DNS record issue. I think this page can help: Managing a custom domain for your GitHub Pages site - GitHub Docs

It could also be a missing file or configuration in the project. I see a GitHub 404 page when I visit luishenrique.space/lander right now.

If you need specific configuration recommendations, please let me know the actual domain and subdomain so I know what records to investigate.

I just reverted all DNS settings related to Vercel to restore access to my GitHub Pages.
I would like to know how I can keep access to my GitHub Pages links (e.g., luishenrique.space/reponame) while setting up a subdomain (e.g., mysubdomain.luishenrique.space) for a project on Vercel.

I would not expect the addition of a CNAME record for mysubdomain.luishenrique.space to have any effect on existing records for your luishenrique.space domain. Just make sure you aren’t changing or overriding the existing records.

You can follow these steps to add the subdomain to your project: Adding & Configuring a Custom Domain

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.