A subdomain is a seperate part of your domain and is most often used to host a website affiliated to your main website.
This article shows the different uses of subdomains and explains how to create subdomains on your web hosting package at TransIP.
The different uses of subdomains
There are many ways to use a subdomain. Below you can find some of the most popular applications.
- Use a subdomain to create a blog or a webshop
If you want to show a blog on your website, you can choose to make it available by visiting blog.yourwebsite.com. In this case, 'blog' is the subdomain of the domain name 'yourwebsite.com'.
If there is a webshop present on your website, you can choose to have it hosted on shop.yourwebsite.com. Because webshops may use different Content Management Systems (CMS), this is an efficent use of a subdomain.
- Redirect visitors to a website based on their device
Subdomains can also be used to redirect visitors to a different view of your website, based on the device they use to visit your website.
For instance, when visiting yourwebsite.com, desktop users will stay on yourwebsite.com, while mobile users can be redirected to m.yourwebsite.com. The website on m.yourwebsite.com can then be configured to be fully responsive for mobile visitors, as it is a different address than the main website.
- Direct your visitors based on their location or language
Using subdomains are a solid way to redirect visitors based on their location or language.
For instance, you can let your website check the area of your visitor and direct them to a subdomain specifically tailored to (the language of) that region.
As you can see there are many uses for subdomains. Take note that we do not offer direct support on these applications. A lot of information can be found online; if you wish to configure a subdomain in any of the ways mentioned above, please consult the online documentation for these applications.
Creating a subdomain on your web hosting package
When you own a web hosting package, you can create a subdomain with a few easy steps. Once the subdomain is created, you can directly create a seperate website on it.
Visit the control panel and head to the tab 'Domains & Hosting' at the top of the page. Next, select your domain name on the left hand side (don't tick the box).
Next to 'Your website', click on the cog wheel, followed by 'Subdomains'.
Create your subdomain by clicking on '+ Create subdomain'. Enter your subdomain and hit 'Save'.
Manage your subdomain with sFTP
After creating your subdomain, you can use sFTP to add the files of your subdomain's website.
You can add files via 'SFTP filemanagement' your control panel or by using sFTP software like Filezilla or Cyberduck. The article 'I want to upload or download my website via (S)FTP' tells you more about the use of SFTP at TransIP.
Once you're in 'SFTP filemanagement' or connected using SFTP software, you will find the web space of your subdomain in the folder named 'subdomains'. Files placed in this folder will be visible when visiting your subdomain.
Folders you place in the folder for your subdomain will also be made visible. For instance, if you add a folder named 'books' in the folder of your subdomain 'shop', the folder will be available via shop.yourdomain.com/books/.
Check your DNS settings
You will now have created a subdomain and supplied it with content. To make this subdomain available for your visitors, it is important to point the subdomain to your web hosting package.
To do so, head back over to 'Domains & Hosting' and select your domain name. Scroll down to 'DNS' or disable the 'TransIP settings' next to 'Domain settings'.
Below 'DNS' you will find the DNS records of your domain name. Copy the IP-address of the first DNS record.
Next, create a new DNS record in the empty field below. Enter your subdomain (for instance shop) as the name, set the Type to 'A' and enter the IP-address in the field below 'Value'. Next, hit save to point your subdomain to your web hosting package.
This article showed you the uses of subdomains and how to create a subdomain on your web hosting package.
In case you have any questions regarding this article, do not hesitate to contact our support department. You can reach them by using the 'Contact us' button at the bottom of this page.
If you want to discuss this article with other uses, please leave a comment below.