...

How to Use a Sub Domain as a Page

creating a subdomain in cpanel

There are a number of reasons for using subdomains. Most people use sub domains to create a separate section of their website, for example, a shop. This could be done using subdirectories, but there are occasions where a subdomain makes more sense. If you want to know how to use a sub domain as a page, you may be wondering you can do this. This may sound complicated, but it’s actually pretty easy.

In general, to use a subdomain as a page, you need to create a subdomain and redirect it to a page. You can create a subdomain using the cpanel or using a plugin. In both cases, to use a subdomain as a page, the subdomain needs to be redirected to the page.

Why Use a Subdomain?

If you’re trying to decide if you want to use a subdomain for a page or a subdirectory, it helps to understand what a subdomain is and when you should use it. A subdomain is essentially a separate website that is hosted under one domain name. If you have a blog or shop you might want to use a subdomain instead of a subdirectory because it allows you to create a separate installation of WordPress or to redirect the subdomain to an entirely different website. For example, if you have a blog hosted separately, you can use a subdomain to connect to the two websites.

Another reason it can be useful is for SEO. Let’s say you have a page with a long-tail keyword URL. This is great for search engine optimization, but not so great for your visitors. Creating a subdomain allows you to have a short URL your visitors can remember while keeping the search engine optimization of a keyword-rich URL.

How to Add a Sub Domain

If you want to use a subdomain as a page, the first step in doing this is creating a subdomain. This can be done with a plugin if you just want to redirect a page to the subdomain. But, if you want to install a separate WordPress installation or shop it will need to be done through the Cpanel. If you don’t have Cpanel hosting, talk to your hosting company about how to move your hosting plan to a Cpanel plan.

Step 1: Go to your Cpanel

Log in to your hosting company’s dashboard. Your Cpanel is generally found under the website hosting section of your products page. Click on the link for Cpanel Admin or Manage Cpanel. This will open up the Cpanel dashboard.

screenshot of Cpanel where you add a subdomain

Step two: Click on Subdomains

Scroll down to the section for domains. This is where you can add a subdomain. Creating a subdomain is a lot easier than you might think. Click on Subdomains. You will see a page that says Create a subdomain.

screenshot of Cpanel dashboard showing you how to add shop as a sub domain

Step 3 Create a subdomain

To create a subdomain type the name of the subdomain under the Subdomain label. Then select the domain name you want to use from the dropdown menu. If you are only hosting one domain name, you will only see one option. Then click create. This is all there is to it. You should now see your subdomain listed in the section underneath called Modify a Subdomain.

Screenshot showing you how to modify a subdomain

Now you have a subdomain. You can change the name of your subdomain or add a redirect in this section. If you decide you want to delete the subdomain you can do that here. Keep in mind anything you install inside the subdomain will be permanently deleted.

You can create a whole new website under the subdomain if you want. But, if you want to know how to use a sub domain as a page, this is where you’ll do it.

How to Redirect a Sub Domain to a Page

If you haven’t created the page, you will need to create the page first. If you are using WordPress, go to the WordPress dashboard for your domain name and create your page. If you are not using WordPress, a redirect is still added the same way. Once you have a URL for your page, click on manage redirection.

screenshot showing youhow to use a sub domain as a page by redirecting the URL in your Cpanel dashboard

Copy and paste the URL for your page under the label redirection. Then click Save. The subdomain will now redirect to your page. If you decide you want to remove the redirect, just go back to your Cpanel subdomain section. Click on manage redirection under the Subdomain and click disable redirection.

Using a Plugin to Make a Subdomain a Page

If you have a managed WordPress hosting plan or don’t want to use the Cpanel dashboard, you can still use a subdomain as a page. We recommend using the Cpanel dashboard when possible. Installing unnecessary plugins can use up resources and slow down your website. In general, it’s best to use plugins as little as necessary. However, if you don’t have Cpanel hosting, a plugin is the easiest option.

Install the Page as Subdomain plugin. This is a free plugin. You can find it by going to the plugin section of your WordPress dashboard. Click on add new. Then search for “page as subdomain”. Install and activate the plugin.

Once the plugin is installed you can redirect your page. You should now see an option under Pages for Subdomains.

screen shot of Page as subdomain plugin

You can now select the page you want to use as a subdomain. The plugin will automatically create a subdomain using the page’s slug. Keep this in mind if you use a plugin to create your subdomain. If you plan to use the subdomain shop.yourdomain.com, the URL of your page should be yourdomain.com/shop

There are some drawbacks to using the Page as Subdomain plugin. The free version only allows you to create one subdomain. If If you want to create a second subdomain you will need to pay for a premium version or use the Cpanel dashboard.

Other things to be aware of when using a subdomain as a page

You will need to install a wildcard SSL certificate

If you have installed a free SSL certificate, the SSL certificate may not work on the subdomain. You will need to install a wildcard SSL certificate. A standard SSL certificate only secures the main domain. A wildcard SSL certificate protects all the subdomains hosted on a single server. Whether you use the Cpanel method of creating a subdomain or a WordPress plugin, you will need a wildcards SSL to secure the subdomain you create.

You may need to add a record to your DNS records

When you use the Cpanel dashboard to create a subdomain, the Cpanel zone editor will automatically create an a record for the subdomain using the Cpanel’s IP address. However, if your domain name is pointed to different name servers than where your cPanel is hosted, you may need to set up an a record where your name servers are hosted that points to the Cpanel’s IP address. Contact the company that hosts your name servers for instructions on how to add an a record for your subdomain.