Hostwizly

How to create subdomain in hostinger

Published 20 July 2023 by Jarvis Silva

In this tutorial we will see how to create subdomain in hostinger web hosting, Subdomains are created on top of your domain for example: name.domain.com, Subdomains can help you to organize and categorize content on your website.

Hostinger allows you to create websites on subdomains very easily so without wasting time let's create a subdomain in hostinger.

Before beginning if you don't have a Hostinger web hosting or you want to buy one then here is a special Hostinger Discount Link for you.

1. Go to hostinger subdomains page

First go to hostinger and login in to your hostinger panel, go inside the dashboard of the website you want to create subdomain of and click the domains tab in the sidebar it will list down subdomains, parked domains and redirects click subdomains.

Hostinger dashboard

After clicking subdomains it will open the subdomain page where you can create subdomains, enter the name of the subdomain you want to create and click the create button.

Hostinger subdomains

Now it will create a folder named your subdomain name in the public_html folder of your main domain, now you can put all your code files and they will serve the subdomain you created.

But now if you go and check your subdomain in browser it will not work because we need to configure some dns for the newly created subdomain so let's do that.

2. Configure DNS for the subdomain

Now to do this you need to go to your domain provider and go to the dns records of the domain and add a new record with the following values:

  • Type: A
  • Name: your subdomain name
  • Content: your website ip address
  • TTL: leave default or choose the smallest value

Below is an example dns record of a test.example.com subdomain in cloudflare it is mostly same in other domain providers.

Dns record for subdomain

So before you go and check your subdomain if it is working make sure to add some code in the subdomain folder so to do that open the hostinger file manager and go inside public_html folder and go inside the folder named your sudomain and put your website code inside it.

Now when you visit your website you should see your website loading and if you are still facing any issues make sure you wait atleast 24 hours because it can take some time to configure your dns records it depends on the domain providers.

You can check if your domain subdomain dns is configured at this website: Ping.eu, enter your subdomain and submit, if it is configured it will show you ping data if not then nothing.

Here are some more Hostinger tutorials for you:

So this was the short tutorial on how to setup a subdomain on hostinger, if you are still facing problems then contact hostinger support they will quickly help you as they have excellent support.

About the author

I am Jarvis Silva, a tech-savvy individual. I have 5 years of experience in website hosting and development, Now sharing all my knowledge related to web hosting and other various technologies on the internet through Hostwizly.