What are Domains & Subdomains
A Domain is the name of your main website. This name is used to call an IP address. This is where your domain is housed. If you want to have a website that is visible and available to everyone, you must have a domain/a web address by which your content will be accessible to everyone. One way to organize the different types of content of your main website is to create Subdomains. Subdomains are subsites within your main site or main domain, therefore, contain the name of your main domain. For example, if your domain name is example.com, the subdomain for a user account will be account.example.com.
Subdomains are highly customizable and can be used as separate sites that have separate WordPress installations. They can have separate DNS records from the main site but cannot have separate nameservers from the main site.
Subdomain Use Cases
Subdomains are used for various purposes. Examples are: an ecommerce site, a blog, a version of your site in a different language, etc.
In this article we will discuss the case of having a separate WordPress installation on a subdomain.
Suppose you have a website how-to-subdomain.10web.site, and want to point your subdomain howto.subdomain.com to it. To do so, log into your 10Web dashboard, click Manage, on the site to which you would like to point your subdomain(In our case it is how-to-subdomain.10web.site).
Then click Hosting Services and Domains. Lastly click on Add Domain.
After clicking Add Domain, a pop up box will appear. In the Domain field, write the name of your subdomain. For example, howto.subdomain.com, where the name “howto” is the SUB and the name “subdomain” is the main DOMAIN. Then click Add Domain.
Let's take a look at two scenarios
- You have your main website example.com hosted at 10Web with the nameservers pointing to 10Web,
- Nameservers of example.com are elsewhere.
In the first case with nameservers of your main site pointed to 10Web, once you have successfully added your subdomain, it will appear in the list of your domains and an A record and a CNAME record will be automatically created for your subdomain.
The only thing left to do is to make your new domain primary: on the 10Web dashboard, select Domains from the Hosting Services menu, then click Make Primary button next to your newly added subdomain (howto.subdomain.com in this example), and next to Manage DNS.
In the second case with nameservers of your main site pointed elsewhere, you now need to create an A record in your main domain registrar. To do this, you first need to locate the IPv4 address of your subdomain. In your 10Web dashboard, go to Hosting services then click on Info. Find your IP address and copy it.
You will need to use this IP address to create an A record in your domain registrar. Go to your domain registrar to set up an A record with the IP address you’ve copied. This step varies for each registrar and provider.
Here’s how you set up an A record with GoDaddy.
Here’s how you set up an A record with NameCheap.
Here’s how you set up an A record with Google Domains.
We recommend setting up a CNAME record as well. It’s optional but you’ll need to point subdomains to your domain, like www.example.com to example.com.
Here‘s how you set up a CNAME record with GoDaddy.
Here‘s how you set up a CNAME record with NameCheap.
Here‘s how you set up a CNAME record with Google Domains.
Enter your new address to check if it’s resolved.
When it is, you’ll be redirected to your .10web.site subdomain.
Make sure to make your new domain primary, as shown above.
That’s it! You’re all set up!