Create subdomain but point to different github repo when using Netlify DNS

I bought a domain evrcare.co from porkbun (quite cheap) and used it for netlify site (also used Netlify DNS to get that SSL)

Now, I want to create a subdomain for evrcare.co like blog.evrcare.co or tomcruise.evrcare.co and point that subdomain to a different github repository and host it as netlify site.

I couldn’t find any solution on how to create subdomain where domain is managed by netlify DNS. is it possible at all to do this in this scenario?

2 Likes

hi, did you work through this article already?

You might also look through these threads:

yes, I went through the articles, these articles are helpful when either DNS is not managed by Netlify or using another branch of same github repository. In my case I want to create a subdomain (using netlify as DNS is managed by it) and point it to different github repository.

@JerryGoyal, I think I understand. You are using our Managed DNS and you want to make a subdomain (like example.evrcare.co) point to a different Netlify site which is deployed from a different repo.

If this is the case, please add the new subdomain in the domain settings page for the site. For example, if the Netlify site is example-site.netlify.com, then add the subdomain here:

If you replace example-site with the subdomain for the new Netlify site in the URL above, this will take you to the place to add the new subdomain for evrcare.co. If you add example.evrcare.co there, this subdomain will now point to this Netlify site.

Also, if you go to the Managed DNS settings for this domain in Netlify, you will see that adding the subdomain to the site also created a NETLIFY type (and possibly a NETLIFYv6 type) record there.

Again, though, you don’t add the records in Managed DNS if it will be an alias for a site at Netlify. The record(s) is/are added in the site domain settings instead.

If this doesn’t work as promised or there are other questions, please let us know.

2 Likes

Hi,
I hope it’s not considered bad manners to reply to an old thread, but this post was the top google result for my search “netlify subdomain different repository”.

The instructions in the last message do not appear to be up to date to netlify’s current interface and the provided link results in “page not found”.

Can someone update this advice?

This thread is for people using Netlify DNS, I’m assuming you’re using it too, @52anton63. If yes, follow along:

  1. Create both the sites, connect them to their respective repos.
  2. Go to your dashboard home > Domains > Add the apex domain as a DNS Zone.
  3. For each site, go to Site Settings > Domain > Add the (sub) domain and that’s it.
1 Like

Hi, @52anton63. I also want to point out that the instructions above say you must modify the URL above and replace example-site in the URL with your site’s subdomain under netlify.app (or under netlify.com as that was the domain used in 2020) . Did you do that? If so, what is your site’s subdomain?

That worked, thanks @hrishikesh!