What you will learn here about Subdomain in networking:
- What is Subdomain
- How to buy subdomain
- How to create a subdomain
- How to buy subdomain in GoDaddy
- Subdomain example
- how to choose a subdomain name
- Can I point different subdomains to same server?
- Can I point a subdomain to another server?
What is Subdomain
The subdomain is part of your domain name. For example, www.bytesofgigabytes.com, where www is a subdomain name and bytesofgigabytes.com is the Root domain name which is shown below. Basically domain name has three parts which is shown below.
How to buy a subdomain
Now the question comes in mind how to buy a subdomain right? The answer is you do not have to buy subdomain, you just have to buy your root domain name or your website name that’s it. Once you buy your root domain name or your website name then you just have to add a subdomain name in your DNS records.
How to create a subdomain
Creating a subdomain is a simple thing, You just need to add A record in your DNS Setting. In your DNS settings, A record has two things and those are name and value which is shown below in the steps. In order to create a subdomain, you need a domain name. If you do not have a domain name then please visit the following link to know how to buy a domain name.
Steps to Create a subdomain
If you do not know how to create a subdomain then please follow the following steps.
1)Please sign in to your account where you have got the domain name. In my case, I have signed to my GoDaddy account from I have got the domain name.
2)Now please click on DNS in front of the domain name which is shown below
3)Now we need to add A record i.e address record. In the below example, I have already modified by root subdomain which you can see below. The default subdomain is www. www is also called as root subdomain.
4)Now in order to add another subdomain please the follow steps
- Please click on Add
- Now please choose A in Records
- Now please enter host as your subdomain name
- Points to is the IP address of instance or host on which your website is running. The default value is Parked
- Click on Save
5)Once you follow the above steps you will see the following kinds of records in your DNS management which is shown below.
6)Now please go to the browser and search for your domain name with root subdomain which is shown below.
7)Now please go to the browser and search for your domain name with a subdomain which is shown below.
The Example of a subdomain is shown below. Just go to the browser and visit google.com which is shown below. In the below example, www is the root subdomain and google.com is the root domain name which is shown below.
Another example of a subdomain is shown below. Just go to the browser and visit cloud.google.com which is shown below. In the below example, cloud is the subdomain and google.com is the root domain name which is shown below.
How to choose a subdomain name?
You can choose your subdomain name based on your application name or content related information. For example, Google uses cloud.google.com for its cloud services or for accounts google uses accounts.google.com So choose your subdomain based on your content or information. The example I have used test as a subdomain name in the above example.
Can I point different subdomain to same server?
Yes, We can choose different subdomains for the same server. You can see in the above examples where www.funfairkatta.com and test.funfairkatta.com pointing to the same server that is the reason I am able to see the same website on both domains name.
Can I point a subdomain to another server?
Yes, You can point a subdomain to another server. The only thing you have to do is you need to add A record in your DNS setting which we have already covered above.