Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialKei Emb
3,929 PointsRookie question about Domains and Subdomains
Hello Treehouse World!
I am in the process of building a web app. My plan is to have users to test a beta site and then proceed to launch the real deal afterwards. I have a domain name (example: johnjones.com) and I would like to create a copy of the app and direct it to a domain such as (johnjones-beta.com) then users can navigate the site, upload etc from there. Would this be a subdomain or add on domain?
What do you all think would be the best practice to go about. Especially if you decide to keep information, content and files from the beta and move it to the real deal site.
Thanks for your help!
-Kei
Hosting: Godaddy
2 Answers
Marcus Parsons
15,719 PointsHey Kei,
A subdomain is a part of the original domain. Subdomains follow a pattern of "xx.domain.com" where "domain.com" is the domain and "xx.domain.com" is the subdomain. If dots separate a string of characters from "domain.com", it is a subdomain. In the case of "johnjones.com" and "johnjones-beta.com" these would be two different domains because only dots can separate subdomains. Any other valid URL characters would be considered separate domains.
If you made "beta.johnjones.com" it would be a subdomain. Notice the dots preceding "johnjones.com" and that nothing follows "johnjones.com" meaning that "beta" is a part of "johnjones.com".
Most hosting companies will allow you to set subdomains, although how many you can set might be dependent on your hosting plan. These do not require any extra money because they are a part of the already purchased domain.
Add on domains require that you own the domain and forward the domain name from the registrar to the service where you have hosting. You'd have to pay a registrar to register that domain for you.
AR Ehsan
7,912 PointsHelped me too.
Marcus Parsons
15,719 PointsAwesome, Abdullah! Glad to help! :)
Kei Emb
3,929 PointsKei Emb
3,929 PointsHey Marcus!
Awesome break down. I understand the difference better now. In the case of creating a website and beta version of the website, would you simply create a sub domain called beta.domain.com or how would you go about this step?
Thanks for your reply!
Marcus Parsons
15,719 PointsMarcus Parsons
15,719 PointsAwesome! :)
Absolutely go with the subdomain. I don't know which GoDaddy plan you have, but I am doing the cheapest one with my portfolio and it allows up to 25 subdomains. Start with creating a new folder inside of "public_html" in your file manager for the subdomain. Put all of your subdomain's files here. Go to your cPanel and go to "Subdomains". Then point the new subdomain to that directory on your file server and BAM! you got it! :D
Kei Emb
3,929 PointsKei Emb
3,929 PointsNice!!! Thanks for the help, Marcus!
Marcus Parsons
15,719 PointsMarcus Parsons
15,719 PointsWell you are very welcome! Good luck, Kei! =]