: How to add a prefix to my domain name? 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
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.
More posts by @Pierce454
2 Comments
Sorted by latest first Latest Oldest Best
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 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...
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 cl.example.com for cl.example.com. This is standard stuff.
Here is the documentation for how to do this in cPanel: 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.
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.