1

pretty simple question but one that I really have no idea how to search for.

I have a domain, let's call it example.com, and I want to set up a testing site with the same domain but at a different URL, let's say beta.example.com.

How would I do this?

Bill the Lizard
  • 398,270
  • 210
  • 566
  • 880
General_Twyckenham
  • 2,161
  • 2
  • 21
  • 36

2 Answers2

3

A sub-domain is just a DNS record pointing to a subdirectory of your website. First you create the site in a subdirectory for the site under public_html (or inetpub\wwwroot\ for IIS), and then match it with a DNS record. Most of the work is done by wizards, but here are the basics.

If you are self-hosting, it depends on your server.

Here is a similar post on StackOverflow with IIS 7: How to set up subdomains on IIS 7

Here is one on Apache: Stackoverflow, Apache Sub-domain

If you are using a hosting company (like GoDaddy, RoutHost, etc), there will be a FAQ or help file on the host, search for Creating (or managing) a sub-domain (GoDaddy Manage SubDomains)

Community
  • 1
  • 1
1

If you are using cpanel or something like that provided from your hosting company - Go to your Cpanel > domains > sub-domains > Create a Subdomain. There you will find information for creating a subdomain.

Shumail
  • 3,103
  • 4
  • 28
  • 35