subdomaingatsbynetlifynetlify-cms

Is it possible to add gatsby blog on a subdomain to pre existing gatsby site?


My question is:

I want to create a gatsby site (the main section of the website). I also want a gatsby run blog with netlify CMS (which is what the site will be hosted with) on the subdomain blog.site.com.

Is this possible? What would I need to research/know to make this happen? For the domain, I will use google domains if that information is needed.


Solution

  • You just need to create two different Gatsby sites:

    On Gatsby's side, you don't need any extra configuration (not even pathPrefix), is just a regular site. The configuration must be done in the server (Netlify) adding each site to a custom domain.

    Regarding the Google domain, you will only need to add the proper DNS in each server. You may find this article insightful: https://medium.com/@jacobsowles/how-to-deploy-a-google-domains-site-to-netlify-c62793d8c95e