Web sites on bare domain names

DNS does not permit CNAME records to exist with the same name as other records. This restriction causes some friction for bare domains which you want to use for both mail and web - for example, if you want botolphs.cam.ac.uk to be both a mail domain (with an MX) and a website (plain botolphs.cam.ac.uk, without the customary leading www.).

The usual way to resolve this is to make an A/AAAA (address) record where an MX is already present that points at the IP address of the server providing the site. This may not be possible, however, when the site does not have a fixed IP address, or the web server does not respond to the bare form of the name with the correct pages.

Another issue can be if pages at the target site do not have the same base URL - for example if http://botolphs.cam.ac.uk is at http://botolphsweb.com/pages/main. This cannot be resolved in the DNS as that can only point botolphs.cam.ac.uk at botolphsweb.com, not the specific page - this would need configuring on the web server itself: the process described below can help, if this is not possible.

UIS web redirect service

The UIS web traffic managers can be configured to return an HTTP-level redirect (301 or 302) from a bare domain to www.[domain] for a plaintext http://... or secure https://... web site address.

For example, in the DNS botolphs.cam.ac.uk could be pointed at the traffic managers and, when asked for http://botolphs.cam.ac.uk they can return a redirect to https://www.botolphs.cam.ac.uk, where the latter is an institution's own server, either inside or outside the UDN.

URLs of both HTTP and HTTPS are supported, although the latter are only possible where the name being redirected FROM is in cam.ac.uk.

The name being redirected TO does not, however, need to be in cam.ac.uk and can be any arbitrary external site, e.g. www.botolphsweb.com. It also does not need to be the toplevel page on that site, so could be to (for example) https://www.botolphsweb.com/pages/college/, so this can used where a website address needs to point at subpages and this cannot be configured on the web server itself. Note that the URL displayed in the visitors' browsers will show the redirected TO address, however.

If you wish to use this service, please contact the UIS Servers and Storage team who will set up the redirect and will, on yor behalf, contact IP Register to add the DNS entries. They will need the following information:

  • The name you with to redirect FROM - e.g. botolphs.cam.ac.uk,

  • The address you wish to redirect TO - e.g. www.botolphs.cam.ac.uk

    • this can be to a subpage,
  • If you want HTTP, HTTPS or both,

  • Whether you want a permanent (301) or temporary redirection (302) - usually a temporary is desirable, unless you're trying to phase out an old address.

Web server within your own mzone

If you host your own web site, there are a few ways you can set it up on your bare domain:

  • Register the web server as a box on the bare domain, and set up www.[domain] as a CNAME pointing at the bare domain.

  • Register the web server as www.[domain], and set up the bare domain as a vbox with an additional virtual IP address. Configure your web server with IP-based virtual hosting.

  • Using the UIS web redirect service.

You should configure your web server to return HTTP redirects from the bare domain to www.[domain] to avoid problems with search engines and caches.