Pointing domain name to sub directory of an ip address

5,032

You need to tell Enjin Guild Hosting the domain that you have registered then you can follow there online tutorial. Basically you don't need to worry about the folder part at your domain registrar because of the way hosting works. All you should concern yourself with is the IP address of the server at Enjin. At the Enjin, there server will have what we call a virtual host file. It'll look something like:

<VirtualHost *:80>
    DocumentRoot /home/enjin-username/public_html
    ServerName www.example.com
</VirtualHost>

If you take a look at the DocumentRoot your notice this is the local path of your hosting package, the virtual host file will use www.example.com in local path of /home/enjin-username/public_html.

You're hosting root directory is /home/enjin-username/public_html. If you make a sub folder with something like a WordPress e.g /home/enjin-username/public_html/wordpress then this would be accessible via www.example.com/wordpress/ if you don't want a sub folder then you move the contents of WordPress into /home/enjin-username/public_html and then delete the WordPress folder.

Basically your DNS at the domain registrar translate the domain to ip address, then at the server it will take a look at what 'domain' was requested and then path the local path seamlessly all in the background.

Please note that /public_html and username in the path is purely speculation, some hosts use /www, /httpdocs, /public_html and so on.

To confuse things even further there's actually two ways you can set this up. If you plan to use email and other servers then simply change your name servers at your domain registrar to the name servers that Enjin has setup,

The name servers at Enjin are:

ns1.enjin.com
ns2.enjin.com
ns3.enjin.com
ns4.enjin.com

If you plan to use your domain with a third party such as external emails then the more preferable route would be to use the A records method.

Enjin's A records and Cnames are:

Root A Record (@): 199.83.134.131
CNAME record (www): app.enjin.com.

I recommend for ease simply just change the name servers.

Share:
5,032

Related videos on Youtube

Stefan15ist
Author by

Stefan15ist

Updated on September 18, 2022

Comments

  • Stefan15ist
    Stefan15ist over 1 year

    I need to point my domain.com to x.x.x.x/directory How should I do this? this doesn't seem to work correctly, if you are familiar with enjin, then I'm using enjin name servers to do this.

    • Admin
      Admin about 9 years
      This cannot be done. DNS only associates a domain name to an IP address. Nothing more. You will need a resolving website defined within your web server first.
    • Admin
      Admin about 9 years
      hum this is not really a website anyways I just have a few folders on it and I wanted pretty much to point a sub domain to a sub directory to be exact
    • Admin
      Admin about 9 years
      You would have to create the sub-domain within DNS and then again on a web server first. Then you can point the sub-domain to the specific directory.
    • Admin
      Admin about 9 years
      I have a question. Why go back to IP addresses? Why not just use a domain name? and if anything special, use different port numbers so you have a website like example.com:9999/folder1/folder2