Table of Contents

Subdomains — like blog.yourdomain.com or shop.yourdomain.com — let you run a distinct section of your site on its own address, and connecting one to your hosting is a quick, everyday task. Whether your domain and hosting are with the same provider or different ones, pointing a subdomain at a server takes just a few minutes once you know the two methods.

This guide explains exactly how to connect a subdomain to your host: a brief refresher on what a subdomain is, the two setups (creating it in your control panel or pointing it with a DNS record), step-by-step instructions for each, when to use an A record versus a CNAME, a Hostinger example, and how to verify it worked. By the end, adding and connecting a subdomain will be simple.

Animated illustration of website files on a server going live to a website in the cloud

Did you know?

A subdomain is treated by servers as its own mini-site, so connecting one is really just telling DNS where that specific prefix should point — either through your host’s subdomain tool or a single DNS record.

What a subdomain is (quick refresher)

A subdomain is a prefix added before your main domain to create a separate, identifiable section of your site — for example, blog in blog.yourdomain.com, or shop in shop.yourdomain.com. It sits before your root domain, separated by a dot, and servers treat it as a distinct mini-site that can point to a different server or hold entirely different files.

Because you already own the root domain, subdomains are free to create and you can make as many as you like. They are commonly used for blogs, online stores, help/support sites, apps, regional or language versions, and staging environments — anywhere you want a clearly separate area under your brand.

Connecting a subdomain to your host means telling DNS where that specific prefix should resolve — which server should answer for blog.yourdomain.com. That is the whole task, and there are two straightforward ways to do it depending on whether your domain and hosting are with the same provider.

Method 1: create it in your control panel (same host)

If your domain and hosting are managed by the same provider, the easiest way to connect a subdomain is to create it directly in your hosting control panel, which sets up the DNS and a folder for it automatically. Here is the process:

  • Log in to your hosting control panel (such as hPanel or cPanel).
  • Open the Subdomains section (sometimes under Domains).
  • Enter the subdomain prefix you want, for example blog or store.
  • Select the main domain you want to attach it to.
  • Set a document root — the folder where the subdomain’s files will live (usually filled in for you).
  • Click Create.

That is it — the control panel creates the subdomain, sets up the necessary DNS automatically, and gives it a folder ready for your files or a fresh install. This is the simplest path because the host handles the DNS side for you; you just name the subdomain and pick where its files go.

Method 2: point it with a DNS record (external host)

If your domain’s DNS is managed somewhere other than the host you want the subdomain to point to — for example, your registrar or a separate DNS provider — you connect the subdomain by adding a DNS record yourself. There are two record types you might use, depending on what your host gives you.

If your host provides an IP address, add an A record with the Host set to your subdomain prefix (like blog) pointing to that IP. If your host or a service provides a hostname to point at instead, add a CNAME record with the Host set to your subdomain prefix, pointing to that target hostname. Either way, you are telling DNS where the subdomain should resolve.

Log in to wherever your DNS is managed, open the DNS editor, add the appropriate record for your subdomain, and save. After propagation, the subdomain resolves to your host. This method gives you manual control and works no matter where your domain and hosting live relative to each other.

A record or CNAME for a subdomain?

When pointing a subdomain with a DNS record, the choice between an A record and a CNAME depends on what your host gives you to point at. Here is the quick rule.

Subdomain: A record vs CNAME

You have Use Example
A server IP address A record blog -> 192.0.2.1
A hostname to point at CNAME shop -> target.host.com
Same-host setup Neither — use the panel Create in Subdomains section

If your host handed you a numeric IP, use an A record for the subdomain. If they gave you a hostname (common when connecting to a platform or service), use a CNAME. And if your domain and hosting are with the same provider, skip the manual record entirely and just create the subdomain in the control panel, which handles the DNS for you.

A Hostinger example

On Hostinger, connecting a subdomain is typically the control-panel method. You log in to hPanel, go to the Subdomains section, type the prefix (say, blog), select your main domain, confirm the document root folder, and click Create. Hostinger sets up the DNS and folder automatically, and you can then install WordPress or upload files to that subdomain.

If your domain’s DNS is managed elsewhere but you want a subdomain to point to Hostinger, you would instead add a record at your DNS provider — an A record with the subdomain prefix pointing to your Hostinger server’s IP, or a CNAME to a Hostinger-provided hostname if applicable.

For most Hostinger users hosting their domain there, the Subdomains tool is all you need — it is the same quick, guided process, and the DNS is handled behind the scenes so you can focus on building the subdomain’s content.

Putting content on your subdomain

Connecting the subdomain is only half the job — once it resolves, you put something on it. If you created it via the control panel, it has its own document root folder, so you can install a separate WordPress site there, upload files, or point a website builder at it, giving the subdomain its own distinct content.

Because servers treat a subdomain as an independent mini-site, what you put on blog.yourdomain.com can be entirely different from your main site — a different WordPress install, a different design, even a different application. That independence is the whole point of using a subdomain.

So after the subdomain connects, decide what lives there: a blog, a store, a help centre, a landing page, or a staging copy of your main site. Install or upload accordingly, and the subdomain becomes a fully functioning section of your web presence, separate from but branded alongside your main domain.

Verifying it worked

After connecting a subdomain, give it time to propagate — like any DNS change, it can take from a few minutes up to 48 hours to resolve everywhere. Then visit the subdomain in your browser to confirm it loads the content or install you set up.

If it does not resolve after propagation, check the basics: for the control-panel method, confirm the subdomain was created and its files or install are in place at the document root. For the DNS-record method, verify the A record’s IP or the CNAME’s target is exactly correct, and that you added the record on the nameservers your domain actually uses.

As with any DNS task, editing the record in the wrong place — a DNS zone that is not active for your domain — is a common reason a subdomain does not appear, so confirm you are working where your domain’s DNS is truly managed. Get the record right, in the right place, and be patient through propagation, and your subdomain will come online reliably.

FAQs

How do I connect a subdomain to my host?

Two ways: if your domain and hosting are with the same provider, create the subdomain in your control panel’s Subdomains section (it sets up DNS and a folder automatically). If your DNS is managed elsewhere, add a DNS record — an A record pointing the subdomain prefix to your host’s IP, or a CNAME to a host-provided hostname.

How do I create a subdomain in my hosting panel?

Log in to your control panel (hPanel or cPanel), open the Subdomains section, enter the prefix you want (like blog), select your main domain, set or accept the document root folder, and click Create. The panel automatically configures the DNS and gives the subdomain a folder ready for your files or a fresh install.

Should I use an A record or CNAME for a subdomain?

Use an A record if your host gave you a server IP address (point the subdomain prefix to that IP). Use a CNAME if you were given a hostname to point at (common for connecting to a platform or service). If your domain and hosting are with the same provider, skip records and create the subdomain in the panel instead.

Can a subdomain have its own website?

Yes. Servers treat a subdomain as an independent mini-site, so blog.yourdomain.com can run a completely separate WordPress install, design, or even application from your main site. After connecting it, you install or upload content to its own document root, giving it distinct content under your brand.

Why isn’t my subdomain working?

Usually propagation (wait up to 48 hours). Otherwise, check that the subdomain was created and has content (control-panel method), or that the A record’s IP or CNAME’s target is exactly correct and added on the nameservers your domain actually uses (DNS method). Editing the record in the wrong DNS zone is a common cause.

Do subdomains cost extra?

No. Because you already own the root domain, subdomains are free to create and you can make as many as you like, subject only to your hosting plan’s resources. You don’t register or pay for a subdomain the way you do a domain — you simply create it under your existing domain in your control panel or DNS.

The bottom line

Connecting a subdomain to your host is a quick, free, everyday task — a subdomain like blog.yourdomain.com is a distinct mini-site under your existing domain, and connecting one just means telling DNS where that prefix should point. There are two ways to do it. If your domain and hosting are with the same provider, create the subdomain in your control panel’s Subdomains section, and it sets up the DNS and a folder for you automatically — the simplest path. If your DNS is managed elsewhere, add a DNS record yourself: an A record pointing the prefix to your host’s IP, or a CNAME to a host-provided hostname.

Choose the A record when you have an IP and the CNAME when you have a hostname, or skip records entirely with the panel method on a same-host setup. Once connected and propagated, put content on the subdomain — a blog, store, help centre, or staging site — since it can run entirely separately from your main site. If it does not appear, it is almost always propagation, an incorrect record, or editing in the wrong DNS zone. Get the setup right and be patient through propagation, and your subdomain becomes a fully working, branded section of your site in minutes.

When you are ready, you can start with Hostinger and use code PROTIPS for the reader discount. Connect a subdomain by creating it in your host’s control panel (same-host, auto DNS + folder) or by adding a DNS record elsewhere — an A record to the host’s IP or a CNAME to a host hostname. Then add content and wait for propagation.

Scroll to Top