2

How do I add something like 'www.CI.domain.com' or 'www.SOMETHING.domain.com'

I am pretty sure its probably something to do with my DNS but how would I get it to point to that specific page?

Basically I just want to set up a directory on my site where I can host my project files and use a .htaccess to protect it.

  • Installing CPanel right now. I didnt want to use it but it seems like the easiest thing to do. – Will May 15 '15 at 4:33
4

You would need to do two things,

One: You will need to create the sub-domains in your DNS. You will use a CNAME (alias) for this. For example.

Creating a CNAME for www.example.com that points to example.com is how www is added to a domain. You will be doing essentially the same thing.

In your case, you would create a CNAME for...

cl.example.com pointing to example.com

and then...

www.cl.example.com pointing to example.com

This ties these sub-domains to an IP address so that any request knows where to go.

Two: On your web server, you will need to create a website for cl.example.com. I assume you are using a control panel. cPanel is the most popular. I am unfamiliar with this so you may need to poke around a bit or call your webhost if the interface is not clear. When you create your website, you will also be creating an alias of www.cl.example.com for cl.example.com. This is standard stuff.

Here is the documentation for how to do this in cPanel: https://documentation.cpanel.net/display/ALD/Subdomains -- it uses a more user friendly language and may not exactly line-up with the terms I used in the previous paragraph. The cPanel documentation leaves a lot to be desired.

If you are familiar with working with configuration files, I can edit this answer for instructions to give you a good start. If you are not familiar with configuring a website this way, I suggest just dealing with the control panel. I know Apache and not Nginx or IIS. It would be helpful to know what software you are using for your web server.

  • I know what to do now! For some reason my mind went blank and I couldn't think of the word 'subdomain'! I just installed CPanel and got it set up! Thanks a ton! – Will May 15 '15 at 4:36
  • 1
    @Will Anytime!! We all draw a blank from time to time. Wait till you get old!! You get to really have some fun with it! – closetnoc May 15 '15 at 4:59
1

it's called a subdomain. You would add it in cpanel - or whatever management panel you have.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.