This article covers setting up a subdomain on Webhosting. This is typically a subdomain that you run on the same service as the main domain. To create a subdomain in DNS (for example, for a website hosted by another provider), follow the guide DNS – Subdomains.
In this article you will learn:
- When to Use This Guide
- When to set up subdomains on Webhosting
- How to create a subdomain:
- How to set up HTTPS on a subdomain
- Common problems
- Frequently Asked Questions
When to Use This Guide
- You want the subdomain to be a separate website with its own directory on FTP: Creating a subdomain via FTP.
- You want to install WordPress or another application on the subdomain: Creating a subdomain using the application installer.
- Your domain is with another registrar and you want to launch the website on a subdomain first: Subdomains on Webhosting and Frequently Asked Questions.
- After moving WordPress from a test subdomain to the main domain, you see error 500 or 403: Error After Moving a Website from a Subdomain to the Main Domain.
- The subdomain reports error 500, or the installer says the target directory is not empty: Error 500 on a subdomain and The subdomain folder cannot be created by the installer.
- You need a test copy of your website on a subdomain, for example before changing the PHP version: Frequently Asked Questions.
Subdomains on Webhosting
On Webhosting named after the main domain, you can create any number of subdomains with separate websites for this domain (and, if applicable, its aliases). Make sure that you meet the following conditions:
- In DNS records of the domain you have A records (or AAAA records) with the name * or with specific subdomains that point to the Webhosting.
- You are using the default .htaccess file in the www folder, or you have added the routing rules for the WEDOS directory structure at the end of your own .htaccess.
- In the www folder on FTP, you have the directories domains and subdom according to the requirements of the Webhosting directory structure.

If the domain does not use our DNS, perform the check at the provider of the DNS servers you actually use.
Creating a subdomain via FTP
You can create subdomain websites via FTP in the folder www/domains, or www/subdom. This choice affects how subdomains behave with respect to aliases. If you do not use aliases, we recommend using the folder www/domains.
A guide to managing files via FTP can be found in the article Webhosting – File Management.
To create a subdomain via FTP, follow these steps:
- Log in to FTP, for example using the client WebFTP ⧉ (Manual).
- Enter the folder www/subdom or www/domains.
- Create a new directory according to the instructions for the given folder.
- Upload the website files, including index.html or index.php.
Subdomains in www/subdom
Websites in the folder www/subdom are shared subdomains of all alias domains. You create a new subdomain here by creating a directory named after the subdomain itself, without the domain extension. For example, on the Webhosting domain.tld you create the subdomain shop.domain.tld by adding a folder named shop to the folder www/subdom.

Subdomains in www/domains
Websites in the domains folder are displayed exclusively on the given domain or subdomain (with or without www).
You create a new subdomain here by creating a directory with the complete domain name, including the domain extension. For example, on the Webhosting domain.tld you create the subdomain shop.domain.tld by adding a folder named shop.domain.tld to the folder www/domains.

Creating a subdomain using the application installer
If you use the application installerto build your website, you do not need to create the subdomain folder manually on FTP. Just make sure that if the following folder exists in www/domains , it is empty (otherwise the installer will return an error).
To install an application on a subdomain, simply enter the subdomain name in the first step of the installation itself, between the http:// and the domain name. For example, on the Webhosting domain.tld you create the subdomain shop.domain.tld by entering the word shop in the field between http:// and domain.tld.

Setting up HTTPS on a subdomain
Fully enabling HTTPS (activating and propagating the certificate) usually takes up to 90 minutes.
You activate HTTPS on Webhosting by following the guide Webhosting – Quick HTTPS Setup. By following the guide Webhosting – Manual HTTPS Setup you then enter the management of domains and subdomains.
Add subdomains to the certificate as follows:
- Click the Add Domains.
- In the lower part of the form, write a list of subdomains (without the main domain name) separated by commas.
- Confirm the addition with the Add Domains button at the bottom of the form.

If no error occurs, HTTPS will be active on the subdomains within 1.5 hours.
Common problems
Common problems with managing subdomains on Webhosting include:
- Error 500 on a subdomain
- The application installer cannot create a subdomain
- Incompatible .htaccess of the main website
- HTTPS does not work on a subdomain with www
- Error After Moving a Website from a Subdomain to the Main Domain
Error 500 on a subdomain
Problem: After creating a subdomain in both the domains and subdom folders, the following is displayed: Error 500 Internal Server Error.
Cause: You must create the subdomain either in the domains folder or in subdom, not in both.
Solution: Delete one of the conflicting folders in domains/subdom.
The subdomain folder cannot be created by the installer
Problem: The application installer reports an error: Target directory /www/domains/sub.domain.tld is not empty.
Cause: The installer detected an existing installation, or its remnants, on FTP.
Solution: Log in to FTP and delete the entire subdomain folder in the domains folder. Do not create a new one.
Incompatible .htaccess of the main website
Problem: The .htaccess file of my content management system is not compatible with the default WEDOS .htaccess, so subdomains do not work.
Cause: Content management systems located in the www folder may overwrite the .htaccess file with their own rules, or their rules are not compatible with those in the default .htaccess.
Solution: If you have a problematic main website in the www folder, move it to the folder www/domains/domain.tld, where domain.tld is the domain of the main website. Then restore the default .htaccess.
Non-working subdomain with www
Problem: We have added a certificate on the subdomain, including the version with www. The subdomain itself works, but the version with www does not. The certificate is active for both.
Cause: This problem is common for domains using WEDOS.protection. The certificate for a fourth-level domain (of the type www.sub.domain.tld) is located on the Webhosting but not on the proxy server, so the connection is evaluated as insecure.
Solution: Redirect the subdomain with www to the fully secured subdomain without www. If you are using our default .htaccess file, add immediately below RewriteEngine On this code:
# 301 redirect www.sub.domain.tld -> sub.domain.tld
RewriteCond %{HTTP_HOST} ^www\.([^.]+\.[^.]+\.[^.]+)$ [NC]
RewriteRule ^ https://%1%{REQUEST_URI} [R=301,L]
Error After Moving a Website from a Subdomain to the Main Domain
Problem: After moving WordPress from a test subdomain to the main domain, error 500 or 403 is displayed and both websites have stopped working.
Cause: The website files are not in the folders matching the domains in www/domains, or the website in www has a modified .htaccess file. Error 500 is often caused by a disallowed directive that a plugin added to .htaccess.
Solution: If you run multiple websites (aliases or subdomains), leave the default .htaccess in the www folder and store each website’s files in a folder named the same as the domain in www/domains. Then restore the default .htaccess. With only one website (no aliases or subdomains), you can keep the website directly in the www folder and overwrite .htaccess with the file from your content management system. If error 403 persists, go through Webhosting – Error 403: Forbidden.
Frequently Asked Questions
If I create a subdomain in both domains and subdom, which one is displayed?
An Error 500will occur. Choose one location for your subdomain and delete the duplicate subdomain.
What should the default .htaccess file in a subdomain folder look like?
The default .htaccess file is located only in the www folder. In subdomain folders you can have any .htaccess files you like. If there is a conflict between .htaccess files or a prohibited directive is entered, an Error 500.
Where does a visitor end up who enters a non-existent subdomain?
If the subdomain does not exist in either the subdom or domains folder, the content of the www folder is displayed.
The subdomain is to be a separate website with its own root directory on FTP. Where should you place it?
The root directory of a Webhosting is always www. Place the standalone website of the subdomain in the folder www/domains or www/subdom, as described in the chapter Creating a subdomain via FTP. You do not need to create an alias for this.
How many subdomains can I create on one Webhosting?
Any number, both for the main domain of the Webhosting and for each added alias.
I have my domain with another registrar. Can I order only Webhosting from you and launch the website on a subdomain?
Yes, Webhosting can also be ordered on its own. At the DNS server provider of your domain, point the desired subdomain to the Webhosting with an A record (or AAAA), and create the subdomain as described in the chapter Creating a subdomain via FTP.
Can I try out a copy of my website with a newer PHP version on a subdomain?
Yes, but only by appending the version number after the extension of the copy’s files, for example application.php83. Two different PHP versions cannot be set up in one Webhosting, see Different PHP Versions on One Webhosting.