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 trial

General Discussion

Super Rookie Question! What is the best procedure or practice with setting up 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

Hi, if you went with something like beta.johnjones.com that would be a sub domain but the johnjones-beta.com would be a completely different domain.

Hello Anthony, thanks for your reply!

If I may ask, what would be the best practice if you are creating a website, but you wanted to release a beta version first?

If possible, if I created a sub domain, could all of the content, uploads, logs, files, database, and users be easily transferred to the domain from the sub domain?

Definitely a rookie question, but just wanting to become clear on how domains and files work.

Thanks Anthony!

Hi, using a sub domain is easy, all you are doing is pointing to a different folder under your main domain. Some hosting services don't even charge for a sub-domain. It really is more of a dns issue then actually registering another domain. As for transferring you really don't have to transfer much. If you are using some type of database like MySQL you can either setup a separate database or us the same one as the real domain but just change the code to only allow certain information on the beta one. I personally would think that multiple domains would be a lot harder then just using sub-domains.

Ok, Great! I Think I'll setup a subdomain, run it as if it is the main site and then when all of the tweaks are are worked out and finished then launch the site under the main domain.

Thanks for your advice Anthony!