Link to home
Start Free TrialLog in
Avatar of bejhan
bejhan

asked on

DNS Server (Resolving)

I own the domain www.bejhan.com so I set up ns1.bejhan.com and ns2.bejhan.com as nameservers which resolve to my IP address. Now my problem is that I need to get www.bejhan.com to resolve to my IP address and also just bejhan.com. I tried to use some DNS servers but had no luck. Also I was wondering if I would be able to create subdomains (eg. cars.bejhan.com) and resolve them to a certain URL (eg. www.bejhan.com/cars/index.htm or members.shaw.ca/bejhan/cars/index.htm). Is there a program or a tutorial that would enable me to do these things easily?

Thanks in advance,
Bejhan Jetha
Avatar of humeniuk
humeniuk
Flag of Canada image

If you're looking for a quick overview of how DNS works, check out www.zoneedit.com/doc/dns-basics.html.

The first question is, what are you using for your DNS service?  You don't need ns1. & ns2.bejhan.com to resolve to your IP address unless you are running your own DNS servers, which probably isn't worth the effort unless you will be hosting several websites.  This is especially true since there are a number of free DNS services available, such as ZoneEdit, which I use (www.zoneedit.com), and DynDNS (www.dyndns.com).  Some domain registrars also offer DNS service, too.  I know that ZoneEdit has a fairly good FAQ section that tells you how to properly set up your DNS records.  Also, you can see an overview of the most common DNS record types at www.maradns.org/tutorial/recordtypes.html.

As it stands right now, ns1.bejhan.com located at 68.150.33.100 is listed as the authoritative name server for your domain.  If you have a DNS server at that IP address, that is where you have to create and/or manage your DNS records.  If you want to use a DNS service like ZoneEdit, you would have to point your domain at their servers instead.  Whatever you use, when you create your DNS zone you will typically create a root record that will associate bejhan.com with its IP address.  To resolve www.bejhan.com to your server, you need to add a host (A) record that points the www host to your IP address.

To create a sub-domain, you would create a host (A) record that points cars.bejhan.com at the IP address where it is hosted.  That might be the same web server or it might be a different one.  Remember that sub-domains are essentially regarded as separate sites wherever they are hosted.  People tend to use either a subdomain (ie. cars.bejhan.com) or a folder structure (ie. www.bejhan.com/cars), but not both.  That doesn't mean it isn't possible.  What you would do in that case is create a virtual host (essentially a different website) for cars.bejhan.com and then simply redirect it to www.bejhan.com/cars.  However, I'm not sure what the benefit of that woud be.

I hope this gives you a little bit of an overview to begin with.  If you have follow-up questions, please ask.  More specific directions would require more information about your setup, ie. do you have a dns server/service? what web server platform are you using? is the website on your own server or is it hosted somewhere?
Avatar of bejhan
bejhan

ASKER

Okay, I am not using a DNS server/service, I am using Apache 2.something and titan ftp server, my website is hosted from my Apache. At my registar (godaddy) I have set my name servers to ns1.bejhan.com & ns2.bejhan.com which are directed to my IP address, so I was wondering how to created records so that when the bejhan.com is used I have records or something to let the browser know what to bring up. So say its any subdomain I don't have set up I want it sent to www.bejhan.com/thisdoesnotexist.htm also bejhan.com is the same as www.bejhan.com then say I want to set up cars.bejhan.com to direct to www.bejhan.com/cars or josh.bejhan.com direct to members.shaw.ca/josh/index.htm.
You can't resolve domain names to your server address without DNS, so you need it.  GoDaddy offers DNS service which you can configure using their 'Total DNS Control'.  To access this, log on to your account and go to 'Manage Domains'.  Select the domain you want to administer (bejhan.com).  Go to 'Nameservers Summary' and click the 'Default Parked Name Servers' radio button and select 'Save Changes'.  This will change the Name Servers your domain is pointed at, but that is OK.  You need to do that in order to access 'Total DNS Control'.

Now when you select your domain name, the 'Total DNS Control' option will appear in the list of admin options on your 'Manage Domains' page.  Click the + beside 'Total DNS Control' to expand the optons.  From the options, select 'Manage DNS Zone File'.  First, add the two following records:

Name: @
Type: A
Value: <public IP address of your web server>

Name: www
Type: A
Value: <public IP address of your web server>

By doing this, anyone who enters www.bejhan.com into their browser address bar will access your website (assuming your web server is configured properly).  Remember that DNS changes can take up to 72 hours to propagate.

Next, you can set up subdomains if you want them.  For the two examples you gave above, you can create the two following records:

Name: cars
Type: A
Value: <public IP address of your web server>

Name: josh
Type: A
Value: <public IP address of your web server>

Now cars.bejhan.com and josh.bejhan.com will resolve to your web server.  However, as I specified in a post above, you will have to do the configuration on your web server to forward those to where you want them.  You will have to create and configure a virtual host for cars.bejhan.com and redirect it to www.bejhan.com/cars.  You will have to create and configure a virtual host for josh.bejhan.com and redirect it to members.shaw.ca/josh/index.htm.

This is everything you need to do to accomplish what you have specified above.
Avatar of bejhan

ASKER

oh so total dns control by godaddy is pretty much the same as zoneedit.com? I guess the part that I was missing was the virtual host part. How do I do that is there a tutorial you can direct it to? The other problem I was having was using my domain for multiple protocols (ftp/telnet/http) does that also have to do with virtual servers?
ASKER CERTIFIED SOLUTION
Avatar of humeniuk
humeniuk
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial