Categories
Pro Tips

Add Sub Domain on Kinsta

Do you want to serve some content from a subdomain on Kinsta. Let's say you have a docs page or another content not related to your main site, and you want it to reside on a subdomain.

Codeable.io

Do you want to serve some content from a subdomain on Kinsta? Let’s say you have a docs page or another content not related to your main site, and you want it to reside on a subdomain.

Here are the steps you need to follow to do that.

Let’s say you want to have your docs pages hosted @ https://docs.example.com.

1. Creating Folder

Your subdomain will reside in a subfolder under your public directory. So the first thing you need to do is log in via SSH/SFTP and create the subdirectory.

Our case will be called docs, and the path will be ~/public/docs.

2. Adding Sub Domain

Go to Sites from your main menu, select your site, and click on Domains from the sidebar. Next, click Add Domain button and enter docs.example.com.

3. Adding CNAME

The next step is to add CNAME for your domain.

To do this, you need to go to Kinsta DNS from the main menu, then click on the Manage link for your domain. Click on the Add DNS Record button, then select CNAME.

  • Hostname should be set as docs.example.com.
  • Points to should be set as @

Additional information can be found here https://kinsta.com/knowledgebase/dns/#nameservers.

4. Adding SSL Certificate

Again go to Sites from your main menu, but click on Tools from the sidebar.

When you click the Modify under SSL Certificates, you will see the Update Let’s Encrypt Certificate. You will see your subdomain, check it and click on the Generate Certificate button.

5. Contact Support

Everything from your side is done; now, you need to contact Kinsta support and send a request (to update your Nginx configuration file).

Once they update the config, you will have your subdomain linked to the subfolder we have created in step #1.

Note: I had a great experience with the support person, but if they are new and don’t know that well Nginx, you can point them to this article https://dev.to/on_stash/configure-nginx-to-host-multiple-subdomains-2g0b

‘Til the next time.

2 replies on “Add Sub Domain on Kinsta”

Leave a Reply

Your email address will not be published. Required fields are marked *