How to connect a domain from a registrar to my newly installed directadmin server

saeednajafipour

Verified User
Joined
Aug 28, 2021
Messages
5
Hi there
I recently Installed DirectAdmin on my server (subdomain.domain.com) which has a single static IP X.Y.Z.W. I can now connect to DirectAdmin using both the IP and the hostname with port number 2222. I want to use this server as a hosting server for some websites. I have some registered domains on another registrar's website where I can change the nameservers of the domains and also their IPs. Right now my question is: How should I change the nameservers of the registered domains to point to my DirectAdmin server (what are the 2 nameservers?) and how should I change the DirectAdmin and the centos 8 server configs to recognize what to do with the incoming requests to access the websites and hosts on my DirectAdmin server. Most of the tutorials that I have seen on the internet are about how to install DirectAdmin or how to secure it. I cannot find any suitable tutorials about how to config the DirectAdmin for a hosting website and how to set the nameservers on the server and also on the domains properly to make this work. I want the main domain "www.example.com" to point into the DirectAdmin server instead of "X.Y.Z.W:2222" or "subdomain.domain.com:2222" and I want other domains (the registered domains in our outside registrar) to point into the hosted websites on our DirectAdmin server. Could you please help me with this concern? Thanks in advance

p.s. : I cannot connect to Roundcube in any ways and I don't know why! although I built it inside customebuild and the link is accessible through the admin panel!
 
Last edited:
subdomain.domain.com
You mean hostname.domain.com. Never use subdomain for a hostname, it's confusing and it's not the same. ;)

At first, if you want to start a hosting company, start doing things right. So either get a second ip (which is still not the 100% correct way) or use your external dns servers, like your registrars DNS servers to point to your server.

If you want to create your own nameservers, so at the registrars you just can change registered domains dns to your nameservers, start getting a second ip first so you can setup nameservers correctly.

There are no real tutorials on the forums on how to start a hosting business, you might better search on youtube for video's.

Very important. What kind of license do you have? Because if you have the personal license, you can only work with your admin account, you can't have other user accounts so no customers.

I suggest you first start and try with one or two domains and see if you get it right.

and how should I change the DirectAdmin and the centos 8 server configs to recognize what to do with the incoming requests to access the websites and hosts on my DirectAdmin server.
Directadmin takes care of that itself, it's all based on correct DNS records on the nameservers, either external or your own.
 
You mean hostname.domain.com. Never use subdomain for a hostname, it's confusing and it's not the same. ;)

At first, if you want to start a hosting company, start doing things right. So either get a second ip (which is still not the 100% correct way) or use your external dns servers, like your registrars DNS servers to point to your server.

If you want to create your own nameservers, so at the registrars you just can change registered domains dns to your nameservers, start getting a second ip first so you can setup nameservers correctly.

There are no real tutorials on the forums on how to start a hosting business, you might better search on youtube for video's.

Very important. What kind of license do you have? Because if you have the personal license, you can only work with your admin account, you can't have other user accounts so no customers.

I suggest you first start and try with one or two domains and see if you get it right.


Directadmin takes care of that itself, it's all based on correct DNS records on the nameservers, either external or your own.
HI Richard
Thank you for your answer.
We just wanted to test if we can setup the server at first with the least amount of resources using a single IP and then do the final configs with 2 IPs. Is it possible to use a single IP and setting the name servers at the registrar side to access the server (with a new server domain) and also connect user domains to there host folders (I can make users ,login with them and also create new domains in their accounts)? or we have to use 2 IPs any ways.
By reading your response, I understand that you think the best resource to learn how to start a hosting is Youtube. am I right?
Thank you very much
 
First of all, please do not quote complete posts, especially not if your answer is right below. :)

To answer your question.... You don't ever use 1 ip for nameservers. I don't support that either. It's probably possible at some registrars to use 1 ip for 2 nameservers, but it's just not done.
You don't need a new server domain really. You can use the domain you're using the hostname with too. But just don't use the hostname as subdomain.
For example. If you have a domain in this example called admindomain.com. Then you can create a hostname like server.admindomain.com or vps.admindomain.com or whatever you like.
You can still use admindomain.com then as your main domain, email and everything else, even create subdomains. However, you can't use a subdomain called server.admindomain.com or vps.admindomain.com if you used that for your hostname. That's all.

Youtube is the best resource to learn various things in a visual way, so how to set up nameservers. For example here's a nice tutorial about how to work with DNS.
I give you the link because the video was not allowed to be embedded.
https://www.youtube.com/watch?v=_3VOj22Ljgg

IMHO the best way to learn is to first learn the basics of linux. How networking works, apache works, mysql works, because if something goes wrong (and believe me it will some time!) then you must be able to fix it. As a hosting panel is just a GUI with extra options over an OS provided with server applications.

Main reason: If you have to fix things, you have very often to work via terminal mode so via SSH. If you don't know your way around SSH this can give you trouble.

I started first with a pc at home with Linux. Put apache on it and Postfix for mail. Learned how to configure these correctly to not have an open relay to prevent spammers, even at helo time, what is helo, how do mailservers work, how does apache work and then I started with mysql and for fun I had some friends as users with a website. This way later on when I couldn't do the work I was doing, I rolled into hosting business.

Anyway, if you want to do things right, I don't want to speed up your financial costs, but 2 ip's for using your own nameservers is the bare minimum.
I don't want to be an *ss but I just don't support nameservers with 1 ip. Somebody else might tho. ;)

Also, if you want to go and sell your hosting, it's a very high priority to learn about how you can secure things in a good way. The presence of a firewall is not enough.

If you want to start very easy with support that fixes your issues via SSH, then cPanel is a better choice, however, if you look at the pricing, you will see why that is.
Directadmin has a bit of a learning curve and you need some basic knowledge, however, a lot cheaper and there is little it can't do.
 
Back
Top