Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have bought a domain name www.mydomain.com on Namecheap, and I have successfully managed to set up redirections to my personal server available at the IP address XXX.XXX.XXX.XXX.

The problem is when I visit www.mydomain.com, the address bar changes to XXX.XXX.XXX.XXX because of the redirection.

I want DNS servers to automatically resolve www.mydomain.com to XXX.XXX.XXX.XXX to avoid the redirection. Namecheap allows me to "Transfer DNS to Webhost", but I do not know what details to enter there (I need to enter DNS server domains).

Is there a procedure to inform DNS servers around the world that www.mydomain.com should now resolve to XXX.XXX.XXX.XXX? What DNS information should I give Namecheap to transfer DNS?

share|improve this question
add comment

2 Answers

up vote 2 down vote accepted

There are four entities in this problem and it rather confuses things that NameCheap are three of them.

  1. Your registrar is the company that takes your money to register a domain with ICANN. They tell the root DNS servers where your nameservers are. For you, this company is NameCheap. If NameCheap are running your nameservers for you, they will use their own domain name and IP addresses at this stage.
  2. Your nameserver is the nameserver that holds all the DNS records for your domain. Bind, PowerDNS and djbdns are three popular examples of DNS software. For you, this company is also NameCheap. NameCheap should provide a web interface that will allow you to change most of these records.
  3. NameCheap's webserver is part of this due to the redirection you set up to redirect to your webserver. When you did this, NameCheap changed the DNS record for www.example.com to point to their webserver and then configured their webserver to respond to all HTTP requests with an HTTP 301 or 302 redirect response with a Location: header that indicated your IP address. This is probably not what you wanted to happen.
  4. Your webserver has an IP address but there are no DNS records in any system that contain that IP address. There is no mapping from a name to that IP address.

What you should do now is log into NameCheap's web interface, find your domain manager and set up an A record for the root of your domain (probably displayed as an @ symbol) that contains your IP address. Then create another A record for the www subdomain that also contains your IP address. Both of these records probably already exist and you will simply need to change them to be A records and to contain your IP address.

Having just watched this NameCheap tutorial I would like to wish you the best of luck getting this right. That video has pushed GoDaddy off the top of the most confusing DNS interface implementations list. It's seriously bad. I hope it's cheap.

share|improve this answer
    
He, thank you for this excellent clarification. Do you know of good domain registrars, as alternatives to GoDaddy and NameCheap? –  Randomblue Feb 24 '13 at 23:04
    
If you are registering thousands of domains then the price your registrar offers will matter, if not then customer relations matter more. Since you don't normally change DNS records very often, reliability and uptime matter more than the interface with a nameserver provider. StackExchange is not a good place for product recommendations but Wikipedia has lists of registrars and nameserver providers that would be a good place to start. –  Ladadadada Feb 24 '13 at 23:29
add comment

You must to create a 'A' record for 'www.mydomain.com.' in your server that points to your ip. Redirection is not a real DNS entry, is a html in your home directory that redirects to your server. When you go to www.mydomain.com you will be redirected to xxx.xxx.xxx.xxx for this rason you are seeing this ip instead of the domain.

share|improve this answer
    
@randomblue It made perfect sense to me. What are you unclear about? –  Michael Hampton Feb 24 '13 at 20:10
    
How can I create an 'A' record for my domain? –  Randomblue Feb 24 '13 at 20:42
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.