How to create subdomains for your server
Updated 11/29/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
How to find your IP address on Windows: public and local
Find your public IP address in a second and your local IP from Settings, Command Prompt or PowerShell, on Windows 10 and 11.
Updated 11/29/2026Networking & DNSHow to use Cloudflare for DNS, cache and protection
Cloudflare offers fast DNS, global cache and basic protection for free. Here is how to connect it to your server.
Updated 11/29/2026Networking & DNSDNS record types explained simply
A, AAAA, CNAME, MX, TXT, NS: what each DNS record means and when to use it.
Updated 11/29/2026