> For the complete documentation index, see [llms.txt](https://docs.hostinger.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.hostinger.com/api-reference/endpoints/hosting/domains/create-website-subdomain.md).

# Create website subdomain

Create a new subdomain for the selected website. Provide a subdomain prefix and, optionally, a custom directory or the website public directory to use as the subdomain root.

{% openapi src="<https://developers.hostinger.com/openapi/openapi.json>" path="/api/hosting/v1/accounts/{username}/websites/{domain}/subdomains" method="post" %}
<https://developers.hostinger.com/openapi/openapi.json>
{% endopenapi %}
