There are times when you have a website up and running, but you want to set up a little something extra. Maybe you are a travel agency and want to create a “bookings” website that is attached to your main site, but slightly different. Maybe you have a website for your non-profit organization and want to set up a giving website that allows donors to give in a completely new environment, without forcing them to leave your site altogether. Whatever the reason is, you will want to do this through a ”subdomain”. These are actually quite easy to set up yourself, but there is a trick to set up a subdomain the right way.
First of all, if you’re still a little lost, what exactly is a subdomain?
You’ve probably encountered a subdomain at some point while visiting some of your favourite websites. Essentially, it’s a new website that has been added on to the main existing website.
mywebsite.com is what is considered to be a domain name
shop.mywebsite.com is a main domain with a subdomain.
The shop. Part of shop.mywebsite.com is the subdomain.
Have you ever booked a hotel room and noticed the domain name has changed from hotelname.com to booking.hotelname.com? You’ve just been sent to a subdomain. It’s a completely new and separate website which is attached to the main (or “parent”) website.
There are already countless tutorials online to outline the process of setting up a sub-domain. But what if you follow the processes outlined in these tutorials and still have no luck with getting it active?
The problem is that almost all of these tutorials assume you know how to direct the new subdomain, so they take you through the process of creating the new subdomain address, but totally forget about helping everyone who needs information about how to actually get it functioning.
So if you would like to learn how to create a subdomain AND make sure it’s functioning correctly, see below:
The below process is for creating subdomains through cPanel and setting up a new WordPress blog/website
- Log in to your cPanel
- Click on “Subdomains”
- Enter the name you wish to use for your new subdomain, and select the main domain name you want it to be attached to
- Click “Create”
- Once you have been given the “success” message, go back to your cPanel dashboard and scroll to the bottom to click on “WordPress”
- Click “Install”
- Set up your new WordPress installation as though you would any other, making sure to select your new subdomain as the address for this installation.
- Complete all of the other installation details and click “Install”
[MORE INSTRUCTIONS BELOW]
Most tutorials end here with the tutor showing a screen grab of them entering their new subdomain in the address bar and it loading perfectly.
Try this to see if it works. If the basic WordPress page loads after trying to go to your new subdomain url, then you have completed the setup correctly. If your WordPress Installation doesn’t load, or you get some form of an error, keep reading to follow the process below.
- Go back to your cPanel dashboard and click on “Advanced DNS Editor”
- Choose the main domain that you wish to edit
- Find the A record for your subdomain and click “edit”.
- In the “name” box (where your subdomain is entered), remove the subdomain and replace it with an asterisk (“*”). Then click “edit record”
- Your asterisk (“*”) should automatically change to show “*.yourdomain.com”. If this hasn’t happened, then you will need to go in and manually type this in to suit your own domain (for us, we would type in “*.visiondigital.marketing”).
- Once this has been edited, you can now try to load your subdomain again by typing it in the address bar.
Sometimes it is best to try this in a different browser, as the browser you used to previously attempt to go to this address could have kept a record or what happened the last time you attempted to go to your subdomain, and bring up the error page.
You can also clear your browsers history and cache data before trying again.
Technically, you should allow up to 24 hours for any changes on the internet to take effect, but if you have followed this process correctly, you should be able to see this subdomain working within a few minutes of making these changes.
If you want to create a subdomain through cPanel, there are lots of tutorials out there, but it can be VERY difficult to find one that actually shows you the process of setting this up to work correctly.
So following this process will get you the final result you’re after.