Frequently Asked Questions

« Previous
How do I really delete a directory and files in Windows?
Next «
How do I set up eduPrint for a Linux server?

45. How to transfer web hosting for a domain

  1. Add the correct virtual host to the webserver
  2. Check to whom the mail to change in DNS should be sent
  3. Send a mail to domainmaster and request the change

Step 1. Add the correct virtual host to the webserver

In order to get the new webserver to respond the new name. Usually one must must add the virtual host to the web server configuration.

Check that the new service is working at the new host. Change the the hosts-file on a client computer. On Ubuntu (Linux) and macOS it is called /etc/hosts and Windows %SystemRoot%\system32\drivers\etc\hosts usually c:\windows\system32\drivers\etc\hosts.

If the webserver is called www.department.uu.se and will be moved to the new IP-address 130.238.39.248 then add the following line:

130.238.39.248 www.department.uu.se

Or if you wish to use both www.department.uu.se and department.uu.se you need to put them both in the hosts-file:

130.238.39.248 www.department.uu.se department.uu.se

Now restart the local webbrowser (Firefox, Internet Explorer etc) and open the website (http://www.department.uu.se/). Your webbrowser will now contact the new IP-address (picked from the hosts-file).

If the website has two names (www.department.uu.se and department.uu.se), you need to test them both.

If the the web browser shows an page like this you need to activate the web site on the new web server. If you run Apache you need to create the correct VirtualHost. Contact the responsible person for the webserver or the web site and let them fix the problem before you proceed.

When everything is OK proceed to the next step. Also, remember to remove your changes to your hosts-file.

Step 2. Check to whom the mail to change in DNS should be sent

Then check the SOA field of the domain. The SOA record contain information on what what the contact person is for the domain. When querying for SOA also authoritative nameserver may be shown.

Use the command Dig for this. Dig is included in macOS and Linux and may be downloaded for free for Windows.

The output may look like this:

$ dig soa bmc.uu.se ; <<>> DiG 9.4.3-P3 <<>> soa bmc.uu.se ;; global options: printcmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 35450 ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 4, ADDITIONAL: 7 ;; QUESTION SECTION: ;bmc.uu.se. IN SOA ;; ANSWER SECTION: bmc.uu.se. 14400 IN SOA ddns.uu.se. domainmaster.uu.se. 2015021900 3600 600 2592000 1800 ;; AUTHORITY SECTION: bmc.uu.se. 1078 IN NS dns2.uu.se. bmc.uu.se. 1078 IN NS dns3.uu.se. bmc.uu.se. 1078 IN NS dns1.uu.se. bmc.uu.se. 1078 IN NS dns.uu.se. ;; ADDITIONAL SECTION: dns.uu.se. 13974 IN A 130.238.7.10 dns.uu.se. 13974 IN AAAA 2001:6b0:b:242:130:238:7:10 dns1.uu.se. 13974 IN A 130.238.4.133 dns1.uu.se. 13974 IN AAAA 2001:6b0:b:215:130:238:4:133 dns2.uu.se. 13974 IN A 130.238.164.6 dns2.uu.se. 13974 IN AAAA 2001:6b0:b:732:130:238:164:6 dns3.uu.se. 13974 IN A 193.11.12.166 ;; Query time: 4 msec ;; SERVER: 130.238.39.248#53(130.238.39.248) ;; WHEN: Fri Feb 27 17:43:03 2015 ;; MSG SIZE rcvd: 304 $ _

There are two interesting things in this output.

  1. The contact person is domainmaster@uu.se. The first unescaped . (dot) in the field is substituted to an @.
  2. There are DNS-servers on uu.se.

Step 3. Send a mail to domainmaster and request the change

The main part of the mail may look like this:

To: domainmaster@uu.se From: me@department.uu.se Subject: change webserver www.department.uu.se Hello, Please make www.department.uu.se a CNAME to www.service.uu.se like this: www.department.uu.se. IN CNAME www.service.uu.se. Kind regards, My contact information

Or, if you wish to change both http://www.department.uu.se and http://department.uu.se it may look like this with only IPv4 addresses.

To: domainmaster@uu.se From: me@department.uu.se Subject: change webserver www.department.uu.se department.uu.se Hello, Please remove the old A-record for department.uu.se and any record for www.department.uu.se. Add the following: department.uu.se. IN A 130.238.39.248 department.uu.se. IN A 130.238.39.252 www.department.uu.se. IN A 130.238.39.248 www.department.uu.se. IN A 130.238.39.252 Kind regards, My contact information.

If you have any questions contact helpdesk@bmc.uu.se or domainmaster@uu.se.

This entry transfer was last modified 2018-06-04

This documentation is covered by GNU Free Documentation License.