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

238 views Asked by At

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.

1

There are 1 answers

0
Ferran Buireu On BEST ANSWER

You just need to create two different Gatsby sites:

  • 1 for the main section of your site
  • 1 for your blog

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