Domain Types Explained
Hostgrid supports three types of custom domains:
- Root domains
- Subdomains
- Wildcard domains
Each serves a different purpose, and choosing the right one depends on how your application is structured.
Understanding these domain types will help you design a flexible routing strategy while making the most of Hostgrid’s domain management and automatic SSL.
Overview
Section titled “Overview”| Domain Type | Example | Best For |
|---|---|---|
| Root Domain | example.com | Customer websites, stores, landing pages |
| Subdomain | app.example.com | Applications, portals, blogs, staging environments |
| Wildcard Domain | *.example.com | Multi-tenant SaaS platforms, dynamic subdomains |
Root domains
Section titled “Root domains”A root domain (also called an apex domain or naked domain) is the primary domain without any prefixes.
Examples:
example.comcompany.iomyshop.co.ukUnlike subdomains, a root domain contains only the registered domain name.
Many businesses prefer using root domains because they are shorter, easier to remember, and often represent the primary website.
Common use cases
Section titled “Common use cases”Root domains are commonly used for:
- Company websites
- Marketing sites
- Online stores
- Personal portfolios
- Customer-owned websites
For example, a website builder might allow customers to connect domains such as:
bakery.comphotography.iomyrestaurant.netinstead of hosting them on URLs like:
customer.websitebuilder.comUsing a custom root domain provides a more professional experience while allowing customers to own their online identity.
Subdomains
Section titled “Subdomains”A subdomain is a child of a root domain.
Examples:
blog.example.comhelp.example.comapp.example.comportal.company.comSubdomains are commonly used to organize different sections of a website or application while keeping everything under the same brand.
Unlike root domains, subdomains can be created freely without registering additional domains.
Common use cases
Section titled “Common use cases”Subdomains work well for separating services or environments.
Examples include:
- Help centers (
help.example.com) - Blogs (
blog.example.com) - Customer dashboards (
app.example.com) - API endpoints (
api.example.com) - Documentation (
docs.example.com) - Development environments (
staging.example.com) - Internal tools (
admin.example.com)
Multi-tenant SaaS applications
Section titled “Multi-tenant SaaS applications”Many SaaS platforms assign every customer their own subdomain.
For example:
alice.platform.combob.platform.comcharlie.platform.comEach subdomain routes users to their own account while sharing the same application.
This approach also allows infrastructure to evolve over time. For example, different groups of customers can be routed to different regions or deployments without changing the customer-facing URL.
Wildcard domains
Section titled “Wildcard domains”A wildcard domain matches every subdomain beneath a root domain.
Instead of configuring individual subdomains, a wildcard uses an asterisk (*).
Example:
*.example.comThis single domain matches requests such as:
alice.example.combob.example.comcustomer-123.example.comanything.example.comwithout creating separate domain entries for each one.
Wildcard domains are especially useful when subdomains are created dynamically.
When to use wildcard domains
Section titled “When to use wildcard domains”Wildcard domains are ideal when you don’t know every subdomain in advance.
Common examples include:
- Customer workspaces
- User-generated sites
- Preview deployments
- Temporary environments
- Dynamic application routing
Instead of provisioning every subdomain individually, one wildcard domain can handle them all.
Catch-all routing
Section titled “Catch-all routing”Wildcard domains also allow applications to receive requests for subdomains that have not been explicitly configured.
For example:
*.example.comcan receive requests for:
alice.example.combob.example.comunknown.example.comYour upstream application can then decide how each request should be handled.
This is particularly useful for platforms where users can create their own workspaces, websites, or applications.
Wildcard SSL certificates
Section titled “Wildcard SSL certificates”Wildcard domains can also use a wildcard SSL certificate.
Rather than issuing certificates for every individual subdomain, a single certificate secures all matching subdomains.
For example, one certificate for:
*.example.comcovers:
alice.example.combob.example.comportal.example.comBenefits
Section titled “Benefits”A wildcard certificate can simplify domain management by:
- Reducing the number of certificates to manage
- Securing newly created subdomains automatically
- Making large-scale deployments easier to maintain
This approach is especially useful for platforms managing hundreds or thousands of customer subdomains.
Choosing the right domain type
Section titled “Choosing the right domain type”Choose the domain type that best matches your application.
Use a root domain if…
Section titled “Use a root domain if…”- Customers connect their own website.
- You are building a website or e-commerce platform.
- Each customer owns their own domain.
Examples:
customer.commyshop.co.ukrestaurant.netUse a subdomain if…
Section titled “Use a subdomain if…”- Different services share the same brand.
- You need separate environments.
- Each customer receives a predictable hostname.
Examples:
app.example.comhelp.example.comstaging.example.comUse a wildcard domain if…
Section titled “Use a wildcard domain if…”- Subdomains are created dynamically.
- You have many customers or workspaces.
- You don’t want to configure every subdomain individually.
Examples:
*.example.comComparison
Section titled “Comparison”| Feature | Root Domain | Subdomain | Wildcard Domain |
|---|---|---|---|
| Customer-owned websites | ✅ | ✅ | ❌ |
| Application portals | ❌ | ✅ | ✅ |
| Dynamic subdomains | ❌ | ❌ | ✅ |
| One configuration for many subdomains | ❌ | ❌ | ✅ |
| Common for SaaS platforms | ⚠️ | ✅ | ✅ |
| Common for website builders | ✅ | ⚠️ | ⚠️ |
Things to know
Section titled “Things to know”- Every Hostgrid domain points to exactly one upstream.
- One upstream can serve many domains, regardless of domain type.
- Automatic SSL is available after domain verification.
- Hostgrid forwards requests to your upstream but does not modify your application’s content or branding.