Creating Subdomains and subdirectories
Subdomain v. Subdirectory
There are two primary strategies for organizing your web space after you’ve built up your domain (the domain you registered when signing up). You can use subdomains or subdirectories to create additional sites.
These function much like file folders on your computer. When you search for your site, your domain will be privileged by a search engine, like Google. Following your domain, subdomains are privileged by search engines over directories. The SEO hierarchy is as follows: domain > subdomain > subdirectory.
Aesthetically, here is the difference between subdomains and subdirectories:
- Subdomains: blog.yourdomain.com
- Subdirectories: yourdomain.com/blog
Create a Subdomain
Step 1: Locating Subdomains
After logging in to Domain of One’s Own, locate Subdomains under Domains in cPanel.
Step 2: Filling out Form
You will then be prompted with a form to create your subdomain. Choose a name and type it into the Subdomain box. Note that subdomains can only contain numbers, letters, and hyphens, but the best subdomains are simple, short, and descriptive.
Step 3: Document Root
After you’ve typed in a name, cPanel will automatically populate the Document Root field for you. This will create a folder to contain your subdomain’s files.
Step 4: Create
Once you’re done, click Create. You should then see a message that your subdomain was created successfully. Your subdomain will now be available as an option for when you install an application, such as WordPress, in Installatron. To learn how to install WordPress, you can visit this guide.
Create a Subdirectory
The simplest way to create a subdirectory (also known as a subfolder) for your WordPress site is to add it in during the installation process. When installing a WordPress site, you’ll be able to choose where you want that installation to live.
Step 1: Select place for subdirectory
When installing WordPress or another application, you will see that underneath the dropdown menu to choose what domain or subdomain you’d like to use, you can enter in a directory.
Step 2: Subdirectory name
More often than not, you will want to remove the default directory, “blog” so that way your URL stays clean, (wordpress.domain.com instead of wordpress.domain.com/blog), but if you want to have your blog be its own site, you may want to leave “blog” in the directory line. However, the subdirectory does not have to be “blog.” It can be “art” or “psych.”