Podcast Episode

262 – Add a Subdomain to Your Domain

Announcements

  • WordPress 4.4 is out! (I think)
  • WordCamp US was a success (I think)

Is there a plugin for that?

With more than 50,000 plugins in the WordPress repository, it’s hard to find the perfect one. Each week, I will highlight an interesting plugin form the repository.

For more great plugins, download my 50 Most Useful Plugins eBook.

The Force is a plugin like Hello Dolly except it displays quotes from Star Wars.

Add a Subdomain to Your Domain

It is not always necessary to register a new domain name when the one you already own will work perfectly fine. Rather than registering a new domain name, you can always create a subdomain using a domain you already own.

A subdomain is a second website, with its own unique content, but there is no new domain name. Instead, you use an existing domain name and change the www to another name. The subdomain name looks like forums.domain.com, help.domain.com, help2.domain.com (assuming you already host domain.com).

Uses for subdomains

  • A staging site for your website
  • A separate CMS
  • A membership area where your content is different than your blog content

Examples:

  • store.yourwebsiteengineer.com
  • dustin.hartzler.com

Subdomains on Your Shared Hosting Provider

  • Under the Domains section select Subdomains
  • Add the part before the [dot] and select the appropriate domain
  • Hit the create button

It will take a few minutes to start working, then it will act like any other domain. You can install WordPress or gasp! any other content management system.

Subdomains at Your Registrar

What if your domain is not registered at your hosting provider?

  • Under the Domains section select Addon Domains
  • Add your domain name. This will also create a folder on your server with that name
  • Under the Domains section select Subdomains
  • Add the part before the [dot] and select the appropriate domain
  • Hit the create button
  • Log in at your domain registrar and add a CNAME
  • At your hosting company find your server’s IP address
  • Add the IP address in the CNAME field

Thank You!

Thank you to the following people for using my affiliate links. As you know I make a small commission when someone uses my link and I want to say thank you to the following people. For all my recommended resources, go to my Resources Page

Full Transcript

Business Transcription is provided by GMR Transcription.

On this week’s episode, we talk about how to add a subdomain, and why you’d want to, on your regular domain, right here on Your Website Engineer Podcast, Episode 262.

Hello, everybody. Welcome back to another episode of Your Website Engineer Podcast. My name is Dustin, and I’m here today talking about subdomains, and we’ll get to that in just a few minutes. I do have a couple of announcements. I think these announcements are kind of imminent because I’m recording this a week before this is going out. The week that this episode comes out, I’m actually at a pharmacy conference with my wife. I’m traveling to New Orleans, just to spend some time with her and spend some time with some colleagues. And so, I’m recording this a few days early.

So, the announcements are that WordPress 4.4 is out – I think. It’s because it’s slated to go out on December 8th – that is Tuesday, that is a day before this podcast is about to be released. And so, if – just as a preeminent thing – like, let’s go ahead and update our website, or back them up, and make sure that we’re all ready to go, so when 4.4 comes out, we can go ahead and update our sites to Version 4.4. In next week’s episode, we’ll talk about when it did come out – like, more information about the release, what new features and things to look for, and all that good jazz.

Another thing that I think is an announcement was WordCamp US was a success. It seems like there was a lot of people that were Tweeting about how awesome WordCamp was, the first WordCamp that is based in the US. It used to be WordCamp San Francisco, used to be the big one. Now, they’re gonna rotate it between cities, and this year and next year is in Philadelphia. And I know it’s a little chilly in Philadelphia this time of year, but it looked like good things were being said about this WordCamp, and I’m excited to see and hear bits and pieces of it. So, yeah, that is all about – those are the announcements on this week, mainly because it’s recording the same week as last week’s episode.

Is there a plugin for that? There is one called The Force, and this is one that is very similar to Hello Dolly. And as we’re getting set for that Star Wars big movie release here in December, this is just – it does kind of the same thing that Hello Dolly was, except you randomly see a quote from Star Wars. So, if this – you know, if you’re using a lot of WordPress sites, you’re in the WordPress dashboard all the time, and you wanna get in the mood for the Star Wars movies, you can go ahead and add this plugin.

That will add a little quote at the top part of your website, in the upper right hand corner of your WordPress dashboard, so you can see that and just get ready for the release for the Star Wars movie. Not a lot of practical applications with this one. It only has a few installs, but I thought it was kind of a fun one that’s there, and just wanted to highlight that one this week on the show.

Now, today we’re gonna talk about adding a subdomain to your domain, and this is something I don’t think I’ve ever talked about it. It’s kind of a straightforward process, but let’s talk about what a subdomain is. So, it’s not always necessary to register a brand new domain when you already have one, and you just need to do – you know, maybe you’re doing some sort of test on your website, or you need a special landing page where people do find things easily. I know that in college, we did a lot of things like we put a subdomain on top of the main domain for the university because it was easier to find things. So, like on Student Senate, it was Senate.ONU.edu. Now, that just seemed to be a little bit easier than going to ONU.edu/Senate, for some reason. It was easier to say, or whatever that may look like.

So, one of those things is you can just go ahead and use your main domain, and then you add a little information in front of it. So, you can – and that’s what the subdomain part is. So, on a recent webinar, I did one that I had Backup.YourWebsiteEngineer.com, and Restore.YourWebsiteEngineer.com. And those were two subdomains that I set up as part of this webinar just to – that I didn’t need another domain name, per se, but I just needed a separate area to do what I needed to do, and so I set up a subdomain.

Let’s see; what else? A subdomain is like a second website, or a third website, or however many of these you set up. It’s got its own unique content, but there’s no new domain name to register. So, this is a great thing to do if you want to keep your costs down. You know, instead of maybe coming up with a brand new domain name for a new product or idea, maybe you could just launch it on a subdomain. You can say, like, NewProduct.YourWebsiteEngineer.com, or whatever that looks like.

You see these a lot. You see, sometimes, you see Help.WooThemes.com, or Help dot this dot that, or Store.Apple.com – like, that’s a subdomain. And so, what subdomains give you the ability to do is if you have – you know, you want to have a website, but your cart is something different – maybe you’ve got your website on WordPress and, gasp, you have your store on Shopify or Magento, or some other platform – you could put it at Store.YourWebsite.com, and you can run those two separate platforms. And so, that’s something to think about.

So, some uses that I came up with – there’s lots of uses that you can come up with. You can use it for a staging site. I know sometimes when people are building a brand new website, they’ll go to, like, Dev.YourWebsiteEngineer.com, and just reinstall everything there and just have a mirror copy of your website, so it’s kind of running side by side. Also, like I mentioned earlier, you can use it for separate CMSs. So, if you wanted to run Drupal for some reason – I know that there was, for a while, like, I had Drupal.YourWebsiteEngineer.com, and Jumila.YourWebsiteEngineer.com, and Magento.YourWebsiteEngineer.com when I was installing and playing with those, a few years back, when I was doing the annual review, or doing a review to see how these platforms are different. So you can do that. You can use subdomains for a separate CMS.

Another thing you could do is you could use it for a membership area for your website. I’ve seen a lot, like, Members.YourWebsiteEngineer.com. And of course, I’m just using YourWebsiteEngineer.com as kind of an example URL. Most of these don’t even exist, but that’s something that you could think of. Like, maybe you have all your VAs, or you have people that manage your website, but you don’t want them in managing your members’ area, or whatever. Like, it’s two separate installations of WordPress. If you want to keep things very, very separate, you can go ahead and install it on a subdomain.

Then, I mean, the downfall is that you actually have to manage two different WordPress sites, but that’s – you know, you take your tradeoffs, if you need something like that, if you need to separate installations, without having to buy another domain name. Granted, you know, buying a domain name is, you know, $15.00 per year, so you’re not out a ton of money, but subdomains are essentially free. And so, yeah, there’s that.

Other places that I’ve seen this kind of be done, like some people will come up with a subdomain so that they can have a shorter URL. So, for example, I could – if I owned the domain Hartzler.com, I could come up with a subdomain that was Dustin.Hartzler.com, which would be kind of neat. I’ve also thought about, you know, like, I could – if it could get, like, Zler.com, I could have a subdomain that’s like, Hart.Zler.com. Like, that could be done, as well. So you could do some cool little things with it, if you were really interested in it. If it’s really hard to get the domain name that you’re looking for, maybe you can get part of your name and then you can create the rest with a subdomain. So, that’s something to think about, as well.

Again, other examples you see out there, you see Store.Apple.com, you see store dot, you know, whatever. There’s a lot of examples, and sometimes you don’t even notice. Like, a lot of times you can go to a website, and it’ll redirect you to the store, which is a separate installation but looks just like the website. Then they’ve done a really good job of integrating the two themes together, but they’re still a separate installation. So, those are a couple of examples.

So, now that we know what a subdomain is, like, how do we add them to our website? And there’s two different ways to do this, and there’s probably more different ways, but these are two examples that I came up with. And the first one is if your domain name – the main domain name that you have – is registered with your shared hosting provider. So, someone like Bluehost, or HostGator, you know, a lot of those come with a place where you can register your domain. And maybe it’s not even that they’re registered with that domain, per se, but you’ve set your name servers to be pointed to that hosting provider. So, you’re on Bluehost, you’ve set your hosting provider – or you’ve set your name service to go to NS1.Bluehost.com, and NS2.Bluehost.com. And so, you’ve got your domain name as pointing right to that server.

So, what do you do? How do you do this? How do you add a subdomain? Well, the first thing is, if you are – if your domain is not hosted with your company – with Bluehost – if the domain isn’t there, then you have to go in and you have to go to Add-on Domains, and then just add your domain there, your main URL. So, in this case, for me, I’d have to go in and say, “Okay, I want YourWebsiteEngineer.com as an add-on domain.” And that’s pretty simple. That’s all you have to do. Just do that, and then you go to your domain section, and then under Domains, you select Subdomains.

And so, in your – this is all in the cPanel in your hosting platform, so that’s where you register your add-on domain, and then you add it at your register – it’s not really registering; you’re just adding on your subdomain. It’s all in the Domain section. And then you just add the part that comes before the dot, so whether it’s Store, whether it’s, you know, Members, whether it’s – whatever that is, you just add that, and you use the drop down menu to get the appropriate domain if you have more than one domain there. And then you hit the Create button, and it goes through its little process, and it actually creates a folder on your server, yadda, yadda, yadda. Like, it does everything that it needs to do to get set up as a working website, or a working URL.

And then, within a few minutes, you can go and you can actually go to it. And there’s really nothing there. There’s not a lot that you can do with it because you’ve done nothing. It’s just a blank folder on your website. So, after it does start working, what you can do then is it looks like it works just like any other domain on your website. So, what that means is you can – if you’re using the one-click installation tool to add WordPress, or something along those lines, you can just select that as a domain name where you want to install WordPress.

So, it makes it super, super simple. You just go in, it looks like – you know, whether it’s YourWebsiteEngineer.com, or Dustin.YourWebsiteEngineer.com, like, they kind of work the same when it goes to how it works as a domain. So, you can go in, install WordPress, install your other content management system, whatever that is. Just go ahead and just start using it like a regular hosting provider, you know? It’s pretty, pretty simple.

Now, what happens if your domain is registered elsewhere, or maybe you aren’t using this main site as your hosting provider? So, say for example – like, this is my situation right now. Right now, I’m using Flywheel to host YourWebsiteEngineer.com, and that runs about $30.00 per month. Well, I don’t really need to pay $30.00 per month for like, these little test sites that I need to spin up every once in a while to do a webinar, or to test something, or to, you know, do whatever.

And so, I have a shared hosting plan over at A2 Hosting, and that one is like $60.00 a year or whatever for, you know, all I can use of shared hosting. And so, right now, with the way YourWebsiteEngineer.com is set up, I have my A records – so, I’m telling YourWebsiteEngineer.com to point to Flywheel servers. And so, since it’s pointing to Flywheel servers, I can also point my domain name – or I can point my subdomains to another server, if I want to. Which is kinda cool. Like, you don’t necessarily have to have your domains on the same hosting platform as your main domain, so your subdomains and your main domains can be absolutely separate.

So, what does that look like? So, what you have to do is you have to go to your domain section, you have to add that add-on domain to your shared hosting provider, you have to do the same steps as before – you add the domain name, it creates a folder on your server, which you won’t use; there’s nothing in there. So, in our case, it’ll show up in my FTP editor, or show, like, YourWebsiteEngineer.com as a folder, and there’ll be nothing in there because I’m not really using it. And then we got to Domain section; we’ll add a subdomain. We’re gonna call this one Store. We’ll put the Store – like, when it creates the Store, it’s actually going to create another folder that’s called Store inside in the installation. And then we can go ahead, we can do the exact same thing. We can install WordPress, we can install Drupal, we can install whatever we want to in that subdomain.

Now, what we have to do it, like once that’s all been created, we have to go back to our hosting provider or our domain registrar. Right now, I’m registering all of mine over at Hover.com, and so I’ve got all of mine over there. And then what you want to do is you’re looking for – wherever your domain is registered, you’re looking for DNS Settings; that’s the main thing you’re looking for. You’re looking for DNS Settings. And what you can do is what’s called a – you add a CNAME, or a CNAME record. And what this is is it basically – you’re adding – you’re giving your domain registrar the information. Like, oh, if somebody goes to this subdomain, that’s where it’s going to redirect to the right place.

And so, what you would do is you go to – you go and you add Store dot – you know, it’s gonna be under YourWebsiteEngineer.com, or whatever your domain name is, under that area. Then you go and you add your CNAME. Your CNAME is whatever comes before that first dot, and then you need an IP address. And in your shared hosting provider, normally that is – if they’re using a cPanel, which a lot of shared hosting providers do, and most cPanels are very similar, if you scroll down on the left hand side, towards the bottom it shows that the shared IP address, and it’s four digits – or it’s four numbers separate by periods. That’s what an IP address is, and then basically you just plug that information in and it is going to go ahead and set up and work the – the propagation is going to happen.

So, what that means is when somebody hits the Store.YourWebsiteEngineer.com, it’s going to look at Hover; it’s going to say, “Oh, it’s supposed to go to this IP address.” Then it goes and looks at the IP address of that shared hosting provider, and then it indexes and looks through; it’s like, “Oh, right here, it’s connected to this account.” So, you have to do both steps. You have to create the subdomain on your shared hosting provider and put something there – you have to put some sort of content so you can see that – and then you have to tell your domain registrar, you have to make sure that you tell it, “Hey, whenever somebody types in this subdomain, it has to redirect them to this IP address.” And so, that’s kind of how it works.

I know that the very first time I tried to set up a subdomain, it was very challenging and a complete nightmare. It was something that it just really took me a long time to wrap my head around. Actually, all of DNS took me a while to wrap my mind around. It is not the simplest of things, but over a couple of years – like, yeah, literally; it took me a couple of years to really figure out how each of the pieces of the puzzle – what was an A record, and a name server, and an MX record, all these different things – like, how do each of these pieces of the puzzle work? And so, it takes a little while to kind of understand and grasp, but I promise, it really isn’t that hard. There’s not a lot of steps.

I’ve kind of outlined it in the show notes for Episode No. 262, so if you just need to see it written down and broken out, head on over to the show notes. Just go to YourWebsiteEngineer.com/262, and that will get you right there to the show notes. And so, there’s two – essentially what we’re doing is we create the subdomain – whether it be with our shared hosting provider or we’re doing it on another hosting provider from where our main website is – and then we have to point our domain name. We have to create what’s called a CNAME. We create that, and then we point that to that shared hosting provider, or wherever that subdomain has been created. In a nutshell, in the grand scheme of things, that’s kind of how it works, and those are the things that I wanted to cover in today’s show.

I do want to say just thank you to the three people – or the three companies that I mentioned on this show: Hover, A2 Hosting, and Flywheel. They are all affiliates of mine. I do have a really good relationship with all of those companies, and I know people at each of those companies, which makes it really nice. And I know that these are companies that I use, and I trust to run my websites. And so, if you are interested in any of those, Hover is the best for domain names. That’s all they do; they do domains and email. That’s it. It’s very straightforward. It’s the fastest way to buy a domain name because they don’t upsell you on anything and if you have any questions about domain names or anything, you call them, you get a person, they never put you on hold, they’ll work with you, and put you through.

And let’s see; what else? A2 Hosting, they do a great job. All of their shared hosting is on non-spinning drives, so that means that they are located on a – what’s it called? I can’t even think of it – solid state drive. Those solid state drives do not spin, they do not crash. Like, they are just that much more quick. Your website loads very, very fast, and when you install WordPress with the A2 optimized, their script, it actually adds a few extra plugins that will optimize your WordPress site to make it run as fast and as efficiently as possible on their servers.

And of course, Flywheel, my favorite host, I’ve talked about them in the past, but they are all wonderful people there. They do a great job of keeping your website up. I’ve signed up for the monitor subscription through Jetpack, and I’ve got an email twice in the last two years that my website was down. One because hardware malfunction, and one it was down for like, five minutes one day, like, in the middle of the night. I wasn’t even worried about it.

So, I love all three of those companies. If you are interested in any way signing up for any of those services with those companies, there are affiliate links in the show notes, and those don’t mean that you have to pay any more, that just means that I get a small commission or a thank you from the company for referring you to there. So, they also give you the best discount. So, well, just go ahead and look for those in the show notes for Episode No. 262.

So, that’s going to be a wrap. I will be in New Orleans for the next couple days. I’ll be heading home, and then by next week, we’ll be able to talk about what actually happened. Was WordCamp a success? And did WordPress 4.4 actually come out? So, I think both of those things are true statements. I think that by the time I record my next episode, WordCamp will be over, it will be a success, and 4.4 will be out, and maybe even 4.4.1. So, we’ll see about that. So, that’s all I’ve got for you this week. I don’t have anything else to talk about with the outro music, so I guess I’ll just say bye- bye, thanks for listening, and yeah, that’s it. Take care. Bye-bye.

Leave a Reply