How to create a subdomain
In the Domain Name System hierarchy, subdomains are domains that are part of your root domain. Using our handy graphic of the anatomy of a URL you can see where the subdomain is:
Subdomains can be used to navigate to different sections of your website. For example, if you wanted to have your online store as part of porkbun.com, you could create a subdomain shop.porkbun.com that points at an online store you set up.
The most common subdomain you see is "www". Web hosts will often have you put in two DNS records, one with the hostname blank and one with the hostname set to "www".
You can create subdomains in Porkbun using our Manage DNS feature.
⚠️️ Note
You need something to "point" your subdomain to in order to create it in DNS. This will typically be the IP address or URL given to you by your hosting provider when you're setting things up.
That's it! Once you've created the record, your subdomain is automatically created in the DNS for your domain, and that subdomain should start resolving within 24 hours.
If you want a subdomain to redirect to a specific URL instead, you can use our How to set up URL forwarding guide to set the subdomain up.
If you are using our static hosting service with your domain, you can also reference our How to set up subdomains in the Static Hosting guide to set up a subdomain in your static hosting environment. This will automatically reflect in your DNS.