How to Create Subdomain in Gatsby/Netlify
So you want to add a subdomain to your site? It wasn't super clear in the docs but I figured it out and wanted to share to make your life easier! 😄
Here's how to create a subdomain for your Gatsby website that's hosted by Netlify.
- Login to Netlify
- Navigate to your website's Settings
- Click on the "Build & Deploy" tab on the left
- Inside Deploy Settings > Branch deploys > select "Let me add individual branches" and add the branches you want to deploy.
- Next in your Settings, go to Domain Management.
- Scroll down to Branch Subdomains and then select the branch you want to deploy as a subdomain.
- Click "Create subdomain" and boom! 💣
Keep in mind the branch name will be used as the subdomain name.