1

I don't have enough information about DNS and domains. I have a domain on my host and I want to add my new domain to point to the server. I find out that it can be done with domain pointers. I set the new domain in directadmin panel and from DNS management menu I set NS records for the new domain pointing to Nameservers of the first domain. I also set DNS records of the new domain pointing to Nameservers of the first domain in the panel of the hosting site I bought the domain from. But when I ping the new domain it says:

Ping request could not find host

Am I doing things right? Did I miss something or did anything extra?

EDIT

Example:

I have a domain (example.com) on a host which uses direct admin. the ip of the server is X.Y.Z.W

example.com has 2 dns according to intoDNS: dns1.something.com. & dns2.something.com.

I bought a new domain from a hosting site (newdomain.com). I want newdomain.com to point to X.Y.Z.W

configs that I've done:

  1. add newdomain.com as a domain pointer alias to example.com

Direct Admin Config

  1. add dns1.something.com. & dns2.something.com. as NS record in DNS Administration for newdomain.com

Direct Admin Config

  1. In the domain management panel of newdomain.com in hosting site I changed DNSs to dns1.something.com & dns2.something.com
  • I don't really understand.. can you try to clarify with an example and provide your configuration? – Tommiie Oct 17 '18 at 8:33
  • @Tom please see edit. I put an example with explanation of what I did – Ali Sh Oct 17 '18 at 9:12
  • If you want newdomain.com to point to X.Y.Z.W then just create an A record for it. You don't need to modify the NS records unless you want to change the hosting provider for the domain. – Tommiie Oct 17 '18 at 9:17
  • and NS records of newdomain.com should be the default ones? – Ali Sh Oct 17 '18 at 9:31
2

Leave point NS records at their default settings. They should point to the hosting company you're using. If you want two domain names to point to the same website, configure those names to point to the same IP address, the address of your webserver, e.g.

example.com.         A   203.0.113.80
www.example.com.     A   203.0.113.80
newdomain.com.       A   203.0.113.80
www.newdomain.com.   A   203.0.113.80

Next you need to configure your webserver (nginx or apache or ...) to either listen to that IP address regardless of the Host header (i.e. the domain name typed into the browser field) or create a VirtualHost for each domain name. In the above example this would mean configuring four virtual hosts.

On your webserver you'll have to add ServerAlias statements so that the server serves the same website for several different Host headers.

I hope this fully answers your question.

  • 1
    what if I don't want to add the configuration to the webserver? I think then I should use domain pointers. This is direct admin's explanation: Instead of creating a redirect, the option will use a "ServerAlias" which will allow another domain to be used without the end user ever knowing the domain is setup with a different name. – Ali Sh Oct 17 '18 at 14:00
  • Correct. Using ServerAlias is the way to go here. You don't need several <VirtualHost> statements if they all point to the same website. I'll modify my answer. – Tommiie Oct 17 '18 at 14:01

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.