How to create subdomains for your server
Updated 10/16/2026
A subdomain (for example app.example.com) lets you run several services under the same domain. It is created with a single DNS record.
1. Add an A record
In the domain's DNS panel, add:
app.example.com. A 203.0.113.10
The subdomain can point to the same server as the main domain or to another one.
2. Configure the web server
In Nginx, add a server block with server_name app.example.com, see How to host multiple sites.
3. Add HTTPS
Each subdomain needs its own certificate (or a wildcard one), see Free SSL certificate.
Wildcard subdomain
To catch any subdomain at once:
*.example.com. A 203.0.113.10
Useful for apps that create subdomains per customer. Check propagation with the DNS propagation guide.
Put this guide into practice on your own VPS
EU cloud servers, billed hourly, ready in minutes, with one-click installs for dozens of apps.
See pricingRelated tutorials
Email DNS records: SPF, DKIM and DMARC
Set up SPF, DKIM and DMARC so your emails reach the inbox, not spam.
Updated 10/16/2026Networking & DNSWhat is a CDN and when you need one
A CDN delivers content close to visitors, faster. Here is how it works and when it is worth it.
Updated 10/16/2026Networking & DNSHow to configure IPv6 on your server
IPv6 is the future of internet addresses. Here is how to enable and check it on your server.
Updated 10/16/2026