Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 387
  • Last Modified:

DNS: Web Site configuration

Hello, experts!

Currently running a web site and in my DNS server (Linux box running Bind) I have an entry on my zone of my web server as:

www     IN    A   111.22.33.44

So, when users type www.xyz.com, they of course get my web server.  However, now my boss want to have the user just to type xyz.com to access our web site.  Should I just add another entry on my zone file to something like

xyz      IN   A  111.22.33.44

?

As always, thank you in advance for your time on this matter.
0
BinaryJob
Asked:
BinaryJob
  • 11
  • 8
  • 3
  • +1
1 Solution
 
Danny_LaroucheCommented:
xyz.com. in A 1.1.1.1  

do not forget the dot after .com.  
0
 
rliu1112Commented:
what you stated up there will actually do something different...
- lets say xxx is you original domain name
- the above would actually point xyz.xxx.com to your ip address not www.xyz.com

assuming that you do own and has maintenance access of xyz.com... the simplest thing is probably the following...

1) configure network solutions (or whatever registrar you use) to set the DNS of XYZ.com to same as your previous www domain.
2) then you would need to create a new zone file (if I recall correctly, each actual domain should have its own zone file)
- if your dns is hosted by a provider (usually your web host), then simply call them and request a new DNS host for the new domain name

NOTE:
regardless of how the previous domain is hosted or DNS'ed, you can either have a provider host the DNS or you can host the DNS in-house yourself. Must just make sure that the domain is configured to point to the correct DNS.
0
 
BinaryJobAuthor Commented:
Hello, rliu1112!

Currently, I maintain our domain and for the sake of this discussion, the following are the assumed servers and their IP's:

dns1.xyz.com    222.11.33.44

dns1 has a zone file called xyz.zone and in it, it contains a reference to my www.xyz.com

www   IN  A  111.22.33.44

Now, the www server is being hosted by another company.  So, if I understand you correctly, I need to point my xyz.com to the IP of my www?  At this point, when I ping xyz.com, the address I get is the 222.11.33.44 which is the IP of my domain registered at "Network Solutions".  Do I need to change this?  Can I use CNAME?  

For the record I am still a newbee.  Is there a step-by-step instruction on this?

Again, thank you!  For your time on this matter.

0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
rliu1112Commented:
Hello BinaryJob,
I will try to provide as much as I could (without giving you bad info... I hope...)

The simplest way, since you registered with Network Solution, then use their DNS... here is how...
1) login into your network solutions account
2) go to your list of domain names
3) click on the choice corresponding to xyz.com
4) click on link for Edit DNS
5) click on the Continue button on the LOWER HALF for CUSTOM DNS SETTINGS (NOT to move)
6) now, its going to ask you to confirm that you want to move to Network Solutions DNS
7) One you confirm, you will be taken to DNS Manager - Advanced Tools
8) click on the Edit/Change botton on the upper most section with the IP Address heading
9) now you should see fields to fill in the IP addresses for 3 default names:
- www.xyz.com
- @ (None) .xyz.com
- * (All Others) .xyz.com
10) change all three to point to the IP address of your original web site.
11) then click on SAVE or CONTINUE or similar to save and continue...
12) then wait a few hours for the DNS change to take effect (they say 24-48 hours, but it varies....)

If you really want to host the DNS yourself..... then its different but if you want, try this first to at least get your new domain going like the way how your boss wants.
0
 
BinaryJobAuthor Commented:
Hello, rliu1112!

Ran it by my boss, and unfortunately he likes for us to maintain our own DNS.  He did however, gave me till the end of this week.  So, it your expert opinion, is this doable?  If so, do you have any links I can read up on?

Again, thank you much!
0
 
rliu1112Commented:
cool.... try post the config of your dns server, so that I could give you a more detailed info...

logically, its the same as above, just configure network solutions' DNS setting for your domain to point to your own DNS then edit the xyz.zone file to point www requests (www.xyz.com) to the IP address of your original web site.

with more info like, the OS, etc of your dns I could get you info that is hopefully easiest to follow.
0
 
netmunkyCommented:
make @ (xyz.com) be an IN A record to 11.22.33.44 (or whatever)
make * (or www) be a cname to xyz.com. (don't forget the trailing .)

@ (root domain) cannot be a cname.
0
 
BinaryJobAuthor Commented:
Hello, rliu1112 and netmunky!

The config below is regards to rliu1112 request.  Hope this is good enough?  If not, please let me know.  I apologize for the changes of the actual domain, but unfortunately, I was instructed to do so.  The O/S is Red Hat 3 running bind.  A good example of what I am trying to attain is the cnn site.  Instead of typing www.cnn.com, users can also type cnn.com and it goes to www.cnn.com.

netmunky...my apology, but can you clarrify as to where I need to make changes?  Do I change an entry on xyz.zone.

Again thank you!

Below is the named file called named.conf for xyz.com
==========>>>>named.conf<<<<==========
// generated by named-bootconf.pl

options {
      directory "/var/named";
      /*
       * If there is a firewall between you and nameservers you want
       * to talk to, you might need to uncomment the query-source
       * directive below.  Previous versions of BIND always asked
       * questions using port 53, but BIND 8.1 uses an unprivileged
       * port by default.
       */
      // query-source address * port 53;
};

//
// a caching only nameserver config
//
controls {
      inet 127.0.0.1 allow { localhost; } keys { rndc; };
};

key rndc {
         algorithm   HMAC-MD5;
         secret      "xxxxxxxxxxxxxxx=";
};

zone "." IN {
      type hint;
      file "named.ca";
};

zone "localhost" IN {
      type master;
      file "localhost.zone";
      allow-update { none; };
};

zone "0.0.127.in-addr.arpa" IN {
      type master;
      file "named.local";
      allow-update { none; };
};

zone "xyzcorp.com" IN {
      type master;
      file "xyzcorp.zone";
      };

zone "xyz.com" IN {
      type master;
      file "xyz.zone";
      };

zone "0.33.11.222.in-addr.arpa" IN {
      type master;
      file "33.11.222.reverse";
      };



Below is the zone file called xyz.zone for xyz.com
==========>>>>xyz.zone<<<<==========
$TTL 1D
; bind database set up for local type addresses
;
;
$ORIGIN xyz.com.
@      IN SOA      dns1.xyzcorp.com.      dnsadmin.xyz.com. (
            2006011701   ; Serial
            21600        ; Refresh after 3 hours
            3600         ; Retry after 1 hour
            604800       ; Expire after 1 week
            86400        ; Minimum TTL of 1 day
            )


;
;  Name servers
;
            IN NS      dns1.xyzcorp.com.
            IN NS      ns1.secondNS.net.

             IN A      222.11.33.44

;
;  MX records
;
            IN MX 10 mail1.xyz.com.

;  Host Information
;
localhost            IN A      127.0.0.1
mail1                  IN A      66.55.44.33
www                  IN A      111.22.33.44
ns1.secondNS.net.      IN A      333.123.123.11


0
 
netmunkyCommented:
xyz.zone is the file that will contain your A and CNAME records

you already have the correct A record:
       IN A 222.11.33.44

just add the line:
*     IN CNAME www.xyz.com.

you can then delete or keep the line
www   IN A 111.22.33.44
if you want it to point to the different ip. if you want www.xyz.com to be the same as xyz.com, delete that line. anything that is not matched by any other line will CNAME to xyz.com (222.11.33.44)

0
 
BinaryJobAuthor Commented:
Good morning, netmunky!

You mentioned to add "*     IN CNAME www.xyz.com.", just to be on a safe side here and please ignore my ignorance on this...the asterisk "*" is also a character that needs to be included, right (just as you indicated)?

Again, thank you!
0
 
netmunkyCommented:
sorry, typo, i mean to say
*   IN CNAME xyz.com.

but yes, the * is required. it is the wildcard that points all other domains to "xyz.com."
0
 
BinaryJobAuthor Commented:
netmunky,

Just to clarify, 222.11.33.44 is my dns server and 111.22.33.44 is my actual web server that users will be accessing.  So, when my users type xyz.com, it will be redirected to my web server?  Sorry for so many little questions, but I am also trying to undeerstand and educate myself as to how all these works.

Again, I can't say it enough, but thank you for your time and assistance.
0
 
netmunkyCommented:
ok so here's how the zone file should look (the ns records point to domains in xyzcorp.com and secondNS.net, so those A records won't appear in this zone):

$TTL 1D
; bind database set up for local type addresses
;
;
$ORIGIN xyz.com.
@     IN SOA     dns1.xyzcorp.com.     dnsadmin.xyz.com. (
          2006060601   ; Serial
          21600        ; Refresh after 3 hours
          3600         ; Retry after 1 hour
          604800       ; Expire after 1 week
          86400        ; Minimum TTL of 1 day
          )


;
;  Name servers
;
          IN NS     dns1.xyzcorp.com.
          IN NS     ns1.secondNS.net.

           IN A     111.22.33.44

;
;  MX records
;
          IN MX 10 mail1.xyz.com.

;  Host Information
;
localhost          IN A     127.0.0.1
mail1               IN A     66.55.44.33
*                    IN CNAME   xyz.com.


to answer your question, yes, xyz.com will point to your web server, as will www.xyz.com. dns queries will work because the NS records point to your dns server.
0
 
BinaryJobAuthor Commented:
netmunky,

xyz.com is a valid domain which when someone sends me an e-mail, it is 222.11.33.44 that respnds to the request which happens to be dns1 for xyz.com.  The box is also responsible for xyzcorp.com domain two separate domains.  xyz.com is a subsidiary of xyzcorp.com.  So, another question, if I change my current xyz.zone file to the above info would it still respond to my email and other Internet request?  IP 111.22.33.44 is just a web server nothing else, and I'm confuse as to how this will answer dns request for xyz.com.

Thank you!
0
 
netmunkyCommented:
ok, say user-a.somedomain.com wants to visit xyz.com, this is what happens

user-a.somedomain.com asks it's configured dns server (ns1.somedomain.com) what A record xyz.com is
ns1.somedomain.com doesn't know, it asks one of the root zones (ie - A.ROOT-SERVERS.NET.) about xyz.com
A.ROOT-SERVERS.NET says to look at i.gtld-servers.net. for info on com.
i.gtld-servers.net contains only 1 thing for all domains, the NS records
it responds with the NS records for xyz.com (dns1.xyzcorp.com)
so dns1.xyzcorp.com then tells ns1.somedomain.com that the A record is 111.22.33.44
ns1.somedomain.com then tells user-a.somedomain.com the answer is 111.22.33.44

the same is repeated for mail, except it looks up the MX record, which is mail1.xyz.com. so it then has to repeat again for finding the A record for mail1.xyz.com.
0
 
BinaryJobAuthor Commented:
netmunky,

Made the changes per suggestion, however, when I type in xyz.com on my browser it times out.  If I type in www.xyz.com, it connects.  Could this be a probagation issue?

Thank you!
0
 
netmunkyCommented:
depending on your timeout and TTL, yes, it does need time to propogate.

i'm assuming you have admin on your configured dns server, you can clear the cache. then do ipconfig /flushdns on your system, and give it a try. otherwise wait 1-24 hours for it to fully propogate.
0
 
BinaryJobAuthor Commented:
I am using Red Hat 3 with bind as my dns server.  I will looked into flushing the cache on bind.  Will keep you posted.

Again, thank you for your time.
0
 
BinaryJobAuthor Commented:
netmunky,

No luck.  Tried this morning and when I type xyz.com on my browser, it times out.  www.xyz.com however, is still working and resolving just fine.  Any suggestions?

Thank you!
0
 
netmunkyCommented:
nslookup xyz.com
nslookup www.xyz.com

make sure the domains are resolving to the same IP

if not, you did something wrong in your zone file, or you didn't reload the zone after changing it (depending on your setup, `rndc reload xyz.com` or `killall -HUP named` or `/etc/init.d/named restart`)
0
 
BinaryJobAuthor Commented:
When I do a dig on xyz.com it does return 111.22.33.44, the web server.  Did do "service named restart" and I did a restart on the box itself.  Also, serial was changed prior to any restart of service and hardware.  Below is the current xyz.zone file:

$TTL 1D
; bind database set up for local type addresses
;
;
$ORIGIN cvcb.com.
@      IN SOA      dns1.xyzcorp.com.      dnsadmin.xyz.com. (
            2006060602   ; Serial
            21600        ; Refresh after 3 hours
            3600         ; Retry after 1 hour
            604800       ; Expire after 1 week
            86400        ; Minimum TTL of 1 day
            )


;
;  Name servers
;
            IN NS      dns1.xyzcorp.com.
            IN NS      ns1.secondNS.net.

            IN A      111.22.33.44

;
;  MX records
;
            IN MX 10 mail1.xyz.com.

;  Host Information
;
localhost      IN       A      127.0.0.1
mail1            IN       A      66.55.44.33
*            IN       CNAME      xyz.com.


Thank you!
0
 
BinaryJobAuthor Commented:
netmunky,
It worked!  Internal DNS was my issue.  External is working fine.  Will modify internal.

Thank you!  Thank You!  I greatly appreciate your assistance.
0
 
netmunkyCommented:
what was the output of nslookup xyz.com
nslookup www.xyz.com
?
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

  • 11
  • 8
  • 3
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now