#What is a subdomain?

The subdomain is a subsection of the main domain. Hierarchically, it is located under the main domain and is also known as a third-level domain. It is always separated by a dot before the actual domain name.



Example: How a domain is structured

Subdomain Structure

#What can I do with a subdomain?


  • Subdomains are often used for extensive online projects that are accessible in different languages. So you can mark them with de.domain.tld or en.domain.tld.
  • Also for large web projects with local reference or for companies with several locations subdomains are often used to better address different regions. e.g. with berlin.domain.tld or nrw.domain.tld.
  • A breakdown into subdomains is also used to distinguish technical services. For example, if you want to additionally publish a shop, a forum or an area for logged-in members on a website.


How Google handles subdomains & subdirectories in terms of SEO is explained below.


With alldomains.hosting, for example, we use the subdomain manage.alldomains.hosting for the customer centre.

#Do subdomains cost extra?

The creation of a subdomain is free of charge.

#How many subdomains can be created?

The DNS zone allows you to create an unlimited amount of subdomains.

#How to create a subdomain & upload content?


1. log into customer center & adjust DNS records

A subdomain is created via a DNS record. To do this, log in to your customer center. Under Purchases -> Nameserver services -> DNS-Service for [yourDomain.tld] -> edit zone records you can create the entry for the subdomain.



There are 2 variants. Either you create an A record with the IP address of the hosting package. Or you create a CNAME record with your domain.




Variant 1: A record with IP address


First you need to find out the IP address of your hosting package.


If you have a hosting package at alldomains.hosting, you will see the field "IP address for the hosted product" under the DNS records. Alternatively, you can find the IP address in the customer center under Purchases -> Hosting Packages -> Hosting package for [yourDomain.tld] -> show details.


This is what a DNS entry for blog.domain.tld that points to the IP address 193.19.92.135 looks like:



RecordValue
Subdomain:blog
Type:A
IP:193.19.92.135



Variante 2: CNAME-record with your domain


Alternatively, a CNAME record is also possible. In this case, simply enter [yourdomain.tld] as the destination.


RecordValue
Subdomain:shop
Type:CNAME
Destination:domain.tld

DNS Entry Subdomain


Note: The DNS entries are changed in a few minutes. It can take up to 24 hours until they are globally adopted on all DNS servers.



You can check the DNS entries with the DNS Lookup on our website:



DNS Lookup


2. Upload content for the subdomain - 2 variants



Variant 1: Load contents into directory of the main domain.

By default, a subdomain points to the subdirectory with the same name within the main domain.


Domain config

Example: The subdomain "shop.domain.tld" displays the content from the folder "www/shop It is important that the respective folder exists. Folders can be created via FTP or the File Manager in the Control Panel.



Variant 2: Load content into own root directory - required for own website & emails.


This configuration is required if you want to run a website or e-mail accounts for your subdomain which are completely independent from the main domain. A multi-domain hosting package Paket is required for this variant. You make the settings in the Control Panel module Domains.



New Subdomain Step 1



Via "Add new domain" domains and subdomains can be easily created.

New Subdomain Step 2



Then you can see them in the list. If the DNS entry is already set correctly, you can start uploading content or installing software.

New Subdomain Step 3

#Can I create e-mail addresses for a subdomain?

For multi-domain hosting packages you can create your own configuration in the control panel and also activate the use of e-mail services.


A second DNS entry of type "MX" is required for the subdomain in this case:



RecordValue
Subdomainshop
TypeMX
Priority0
Destinationshop.domain.tld


DNS MX Entry

#Wildcard subdomain

With the Wildcard Subdomains option, all subdomains are hosted in addition to the main domain (domain.tld). Additionally, a rewrite for subdomains can be activated, whereby a subdomain points to the subdirectory of the same name in the main domain.


Example: For the subdomain "shop.domain.tld" the contents from the folder "www/shop" are displayed.
Without this option, the contents of the main domain will be delivered. Also, a configuration can be done manually in the .htaccess file using your own rewrite rules.

#Can I rename/change a subdomain?

The subdomain cannot be changed, but you can easily create a new subdomain.

#How can I delete a subdomain?

A subdomain can be deleted in the DNS zone if you remove the corresponding DNS entry.

#Can subdomains also be used for redirects?

With the appropriate configuration on the web server, you can create a redirect. For example via an .htaccess file.

#What is a subfolder/subdirectory?

Unlike a subdomain, which is a lower-level of your website (https://domain.tld) and therefore has the following structure: https://subdomain.domain.tld a subfolder is simply a subdirectory on the same domain, such as https://domain.tld/subfolder.


Note: Subdirectories are case sensitive. If the subdirectory is "Subfolder", it cannot be accessed under "subfolder". It is easiest to keep the names in lower case and to avoid special characters.

#Subdirectory or rather subdomain? Influence on the Google Ranking!

In most cases, the use of subdirectories makes more sense! The important thing is how Google handles subdomains.


Google considers subdomains as independent domains, which means that links, authority and trust do not affect the main domain and vice versa.


With a subdirectory, it behaves exactly the other way round. All incoming links also count towards the authority of the entire website.


For publicly accessible content that is relevant to your entire website, you should therefore prefer to choose a subdirectory. If the Google rankings are not relevant for you, the subdomain is completely different content or a member area that is only visible with login, you can use a subdomain without hesitation.

#Difference between a domain and a subdomain

The big difference between a domain and a subdomain is that the subdomain is a part of the domain, but not the main domain itself. The main domain itself is seen as the "root" and the subdomain is a part of it which can be used separately.

#How long does it take until I can use the subdomain or upload content and it is publicly available?

At alldomains.hosting the DNS entries are active in a few minutes. Once you have created the subdirectory, you can start working with your subdomain.


It can take up to 24 hours until your subdomain is correctly accessible from anywhere in the world. The reason for this is that the DNS changes have to be adopted by all internet providers worldwide.