Skip to content

How to Set Up Subdomains for a Shop, Blog and Member Area

A subdomain lets one domain host a shop, a blog and a member area on separate services. This guide covers naming, DNS records, SSL and testing.

10 min readUpdated Nov 19, 2026By XPASS Editorial Team

How to Set Up Subdomains for a Shop, Blog and Member Area

Most businesses start with one website on one domain. Then the shop needs a different platform, the blog is written in another tool, and customers want a sign-in area that looks separate from the marketing pages. You could buy a new domain for each of these, but there is a simpler route: subdomains. A subdomain is a name you add in front of the domain you already own, and it can point to its own server or service.

This guide explains what a subdomain is, how to plan names for a shop, a blog and a member area, and how to create the DNS records step by step. It also covers the points that cause most mistakes: records that conflict, certificates that do not match, and changes that seem not to take effect. If you want to read about the related www question first, see how to make a domain work with and without www, since that choice affects how you name your main site.

What a subdomain is and how DNS treats it

A domain name is read from right to left. In shop.example.com, the last label com is the top-level domain, example is the name you registered, and shop is a label you chose to add on the left. The DNS system, described in the original specifications in RFC 1034 and RFC 1035, is a tree. Each label is a branch below the one to its right. You own the branch you registered, so you decide what sits beneath it.

Creating a subdomain does not involve a registrar purchase. You add a record in your domain's DNS zone that says "when someone asks for shop.example.com, here is the answer." The answer can be an IP address (an A record for IPv4, or an AAAA record for IPv6) or an alias to another hostname (a CNAME record). Because each subdomain is its own name in the zone, each one can point to a different place. That is the whole trick: one domain, many destinations.

A few things follow from this:

  • A subdomain is independent of the main site. The web server for example.com knows nothing about shop.example.com unless you set it up that way.
  • A subdomain is not a separate domain for ownership purposes. If you lose control of the main domain, you lose all the subdomains with it.
  • A subdomain can have its own subdomains, such as eu.shop.example.com, but each extra level adds management work and rarely brings a benefit for a small site.
  • Visitors see the subdomain in the address bar. A clear name is part of the user experience.

Planning names for a shop, blog and member area

Before touching any DNS settings, decide which names you will use. Changing a subdomain later means updating links, bookmarks, email templates, payment return addresses and sometimes search listings, so a few minutes of planning saves hours.

Purpose Common name Typical destination Notes
Online shop shop or store An e-commerce platform or a separate server Often runs on a hosted shop service that gives you a hostname to point at
Blog or news blog or news A blogging platform or a CMS Alternative: a folder on the main site
Member area members, account or app A web application with sign-in Keep it on its own name so security settings can differ
Help or documentation help or docs A help-centre tool Optional
Staging or testing staging or test A copy of the site for trying changes Restrict access so it is not public by accident

A few naming habits help:

  • Use short, lowercase names made of letters, digits and hyphens. Avoid underscores in names that will be used as web hostnames.
  • Pick words that a customer can read out over the phone. members is clearer than m1.
  • Do not reuse a name for two purposes. If app is the member area today, do not later move the blog there.
  • Keep a short list of every subdomain and where it points. Over time, forgotten records are one of the most common sources of confusion.

Subdomain or folder: choosing the structure

You do not always need a subdomain. A folder such as example.com/blog serves the blog from the same site as the main pages. A subdomain such as blog.example.com can serve the blog from a different platform entirely. Here is a practical way to choose.

Choose a subdomain when:

  • The part of the site runs on different software or a different hosting service from the main site.
  • You want to separate the security setup. A member area handling sign-ins may have stricter settings than a brochure site.
  • Different people or teams manage the parts and you want a clean boundary.

Choose a folder when:

  • Everything runs on one platform and the content is part of the same site.
  • You want a single set of settings, one certificate and one analytics view without extra setup.

Neither choice is wrong. The usual mistake is picking a subdomain because it looks tidy and then discovering you need to maintain two sites with two sign-ins. Decide based on how you will operate the software, and write down the reason so a future colleague understands it.

Step by step: creating the DNS records

The exact screens differ between DNS providers, but the steps are the same everywhere. You edit the DNS zone of your domain, at whichever company hosts your nameservers. If you are unsure where that is, look at the nameservers listed for your domain; the company running them is where DNS changes must be made. You can complete this task with the basics below.

Step 1: Collect what the service tells you to use

Every shop, blog or application host will give you one of two things: an IP address, or a hostname to point your subdomain at. Copy the value exactly. Note whether the service wants an A record, an AAAA record or a CNAME record.

Step 2: Add the record

In your DNS provider's panel, choose "Add record" and fill in:

  1. Type: A, AAAA or CNAME, as the service instructed.
  2. Name or host: only the label, such as shop. Most panels add the domain automatically. If the panel asks for a full name, write shop.example.com. Check the preview, because writing the full name in a field that already appends the domain produces shop.example.com.example.com, a common slip.
  3. Value or target: the IP address or hostname from step 1. For a CNAME, the target is a hostname, never an IP address.
  4. TTL: the time in seconds that resolvers may keep the answer. A lower value such as a few minutes helps while you test; a longer value reduces lookups once things are stable.

Save the record. Repeat for each subdomain: shop, blog, members.

Step 3: Tell the service about the name

Most platforms need to be told which hostname to expect. In the shop or blog settings, add shop.example.com as a custom domain. Without this, the platform may receive the request and not know which site it belongs to, and it will show a generic error page.

Step 4: Enable HTTPS

Visitors expect the padlock. The certificate must match the exact hostname. Many hosted platforms request and renew a certificate for you once the DNS record points at them. If you manage your own server, you can obtain a certificate for each subdomain or one wildcard certificate, and the ACME protocol (RFC 8555) is what most automated tools use to do this. See the section on certificates below.

Step 5: Test

Open the subdomain in a browser and check that the right site appears over HTTPS. Then check from the command line or an online tool. The article on checking DNS with dig for beginners walks through the commands that show what a resolver is returning.

A worked example

Suppose the owner of mybrand.example runs a main marketing site on one host and wants three new areas.

  • The shop runs on a hosted e-commerce platform, which tells her to point a CNAME at a hostname such as stores.platform.example.
  • The blog runs on a blogging service that gives her an IPv4 address and an IPv6 address.
  • The member area is her own web application on a server with a fixed IPv4 address.

Her DNS zone would gain these records:

Name Type Value Purpose
shop CNAME stores.platform.example Shop on the hosted platform
blog A the blogging service's IPv4 address Blog
blog AAAA the blogging service's IPv6 address Blog over IPv6
members A the server's IPv4 address Member area

She then adds each hostname inside the relevant platform, waits for the certificates to be issued, and visits all three addresses. If the shop shows a certificate warning for a few minutes, she gives it time and tests again before changing anything; the platform may still be issuing the certificate.

Notice that blog has two records of different types on the same name. That is allowed: an A record and an AAAA record can coexist. What is not allowed is mixing a CNAME with any other record type on the same name, which brings us to the next section.

Limits and what to watch for

Subdomains are simple, but several traps appear again and again.

CNAME rules

A CNAME says "this name is an alias for another name." Because it replaces the answer for that whole name, a CNAME cannot coexist with other record types at the same label. You cannot give shop both a CNAME and a TXT record. If a service asks for a verification TXT record on the same label that holds your CNAME, put the verification on the name the service specifies (often a different label, such as _verify.shop) rather than forcing both onto one name.

A CNAME is also not valid at the root of the domain, example.com itself, because the root must carry other required records such as the zone's own authority records. Some DNS providers offer an "ALIAS" or "flattening" feature to work around it, but that is a provider feature, not standard DNS. Subdomains avoid the issue because they sit below the root.

Wildcard records

A wildcard record, written *.example.com, answers for any name that has no more specific record. It can be handy, but it also means typos such as shpo.example.com resolve and look legitimate. Use wildcards only when you have a clear reason, such as a platform that creates a subdomain per customer.

Certificates

A certificate for example.com does not automatically cover shop.example.com. Each hostname must appear in the certificate, either by name or through a wildcard such as *.example.com, which covers one level only. It does not cover eu.shop.example.com. If you see a certificate warning on only one subdomain, the usual cause is that the certificate was never requested for that name, or the name points at a service that has not yet issued one.

Cookies and sign-in

Browsers decide which sites can read a cookie based on the domain it was set for. A cookie set for .example.com can be sent to every subdomain, which may be convenient for sign-in across the shop and member area, but it also means a less trusted subdomain could receive that cookie. Keep sign-in cookies limited to the exact host when you can, and treat any subdomain running third-party software as less trusted than the one holding customer accounts.

Email

Subdomains used for the web do not change where email goes. Mail for you@example.com follows the MX records for example.com. If you also send mail from a subdomain, such as order notices from shop.example.com, that name needs its own mail records. Do not assume that settings for the main domain apply.

Forgotten records

When you stop using a service, delete the DNS record that points to it. A CNAME that still points at a platform account you have closed can, in some cases, be claimed by someone else, who then serves content under your name. Review your list of subdomains from time to time and remove anything unused.

Propagation and caching

Changes are not always visible everywhere at once. Resolvers keep answers until the TTL runs out. If you replace an old record, the previous answer may linger for as long as its old TTL. A negative answer ("this name does not exist") can also be cached, so if you tested the name before creating the record, you may have to wait a little. If you plan to move a subdomain, lower the TTL a day ahead of the change.

Troubleshooting common problems

Symptom Likely cause What to try
Name does not resolve at all Record missing or typed in the wrong zone Check that the record exists at the DNS provider that hosts your nameservers
Address looks like shop.example.com.example.com Full name entered where the panel appends the domain Edit the record and enter only the label
Site loads but shows the wrong website Platform not told about the custom hostname Add the hostname in the platform's domain settings
Certificate warning on one subdomain Certificate does not include that name, or is still being issued Request or wait for a certificate covering that exact hostname
CNAME cannot be saved Another record already exists on the same name Remove the conflicting record or choose a different label
Works for you but not for others Cached answers differ between resolvers Wait for the TTL to expire and test from another network

When a problem remains, work from the bottom up. First check that DNS returns the expected answer, then that the web server answers on that hostname, then that the certificate matches. Skipping straight to the certificate or the application often wastes time when the real fault is a single mistyped record.

A routine for keeping subdomains healthy

A small habit prevents most of the trouble above:

  1. Keep a simple table of every subdomain, its record type, its target and who is responsible for it.
  2. When you add a service, record the date and the reason.
  3. When a service ends, remove the DNS record on the same day.
  4. Before big launches, lower the TTL on the records you may need to change.
  5. After any change, test the name in a browser and with a lookup tool from a network other than your own.
  6. If you manage security-sensitive subdomains such as a member area, consider signing your zone; our article on whether DNSSEC is needed for regular websites explains the trade-offs in plain language.

Registering the domain itself is the foundation for all of this. If you are choosing or managing the name your subdomains will hang from, the domains page shows what is available and how to manage DNS for it.

Summary

A subdomain is a name you add in front of a domain you already own, and each one can point to a different server or service. Plan clear names for the shop, blog and member area before you start. Create an A, AAAA or CNAME record for each, following exactly what the service tells you, add the hostname inside the service, and make sure a certificate covers every name. Watch for the usual traps: CNAME conflicts, mismatched certificates, cached answers and forgotten records. Test after every change and keep a short list of what points where. When you are ready to pick or manage the domain that your subdomains will belong to, the domains page is a good place to continue.

Frequently asked questions

What is a subdomain?

A subdomain is a name placed in front of your main domain, such as shop.example.com or blog.example.com. You create it with a DNS record, and it can point to a completely different server or service from the main site.

Do I need to buy a new domain for each subdomain?

No. Subdomains belong to the domain you already own. You add DNS records for them in your domain's DNS zone, and no separate registration is needed.

Should I use a CNAME record or an A record?

Use an A or AAAA record when the service gives you an IP address, and a CNAME record when the service gives you a hostname to point at. A CNAME cannot sit on the same name as other records, and it is not allowed at the root of the domain in standard DNS.

Do subdomains need their own SSL certificate?

Each hostname must be covered by a certificate that matches it. You can request a certificate per subdomain, or use a wildcard certificate that covers one level of subdomains. Many hosting services issue the certificate for you after the DNS record is in place.

Is a subdomain or a folder better for a blog?

Both work. A folder such as example.com/blog keeps everything on one site, while a subdomain such as blog.example.com lets you run the blog on a separate platform. Choose based on how you will manage the software, not on a rule of thumb.

About the author

Bob Kanokphon Thongdee, founder of XPASS VPN

Bob Kanokphon Thongdee

  • Founder of XPASS VPN
  • Co-founder of eSIMonline.asia
  • More than 7 years in online marketing
  • Founder of Cojourney Visa and Cojourney Travel

Ready to register your domain?

Search a name, compare extensions and pay once for the years you choose.

.com registration from $18.81 for the first year

Search domains

Keep reading

Domain & DNS Guides

How to Make Your Domain Work With and Without www

Visitors type your domain both ways, so both must work. This guide covers choosing a preferred address, DNS records, redirects, SSL and testing.

9 min read

Domain & DNS Guides

What Is DNSSEC, and Does an Ordinary Website Need It?

DNSSEC signs DNS answers so resolvers can detect tampering. Here is what it does, what it cannot do, and how to decide whether a normal website needs it.

9 min read

Domain & DNS Guides

How to Check DNS with dig: A Beginner's Guide

dig shows exactly what DNS returns, including status codes, flags and TTLs. This beginner guide covers the commands you need and how to read every part of the output.

10 min read