0

I write PHP for an internal company website. So I don't have a lot of experience with Domain Names, Servers, IP Addresses etc.

I have been asked by a friend to change his website’s domain name. I am trying to do this for him but I haven’t had much luck.

He has both domain names registered. I have the login details to his 123-reg account. There seems to be no way that I can see to easily do this for him.

I have pinged his current website, it gives me an IP address. But when I enter the IP in to a URL, it doesn’t go to his website, it goes to a really unhelpful webpage.

http://hermes.krystal.co.uk/cgi-sys/defaultwebpage.cgi

When I enter the IP in to who.is, the details are for some random hosting company, Krystal Hosting.

I guess my question is... Is attaching a new domain name to an IP usually a relatively straight-forward process? If so, what am I not understanding?

Maybe it’s just the GUI for 123-reg that is making is so damn hard for a beginner?

I’m really confused!!

0

1 Answer 1

1

I'm not quite sure where are you having issues with that task, so I'll explain a little bit how you should do that in order to work. So, now your friend has a domain called hermes.krystal.co.uk and you want to point a different domain to do have the same response, right? There are two easy way how you can accomplish this.

Method 1

Right now, hermes.krystal.co.uk has this A record:

$ dig hermes.krystal.co.uk
[...]
;; ANSWER SECTION:
hermes.krystal.co.uk.   14400   IN  A   77.72.1.66

If you want to point the second domain to the same place, you'll have to add an A record to the same IP address. Resuming, an A record is the IPv4 address where the domain request will try to connect to.

  • More on A record, here.

Method 2

Define a CNAME record to the first domain, something like that:

yourseconddomain.com.  1400    CNAME   hermes.krystal.co.uk

Speaking very vaguely, a CNAME record is like a "pointer" to an existing DNS record which will make the query resolve against the same destination A record.

  • More on CNAME record, here.

In any case

The reason why you're seeing an ugly page when you access directly the website with the IP address in the browser is because the web server is not configured to serve the content for that request. In any case, you should add the second domain name in the configuration of the web browser.

  • For apache2, use ServerAlias
  • For nginx, use several entries in the server_name directive
  • For any other, Google it :-)
0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .