DNS Settings

Bruno Wolff III bruno at wolff.to
Mon Feb 20 14:28:11 UTC 2006


On Mon, Feb 20, 2006 at 08:57:37 +0300,
  str tux <str.tux at gmail.com> wrote:
> Hello People,
> 
> In my DNS setting I added A record of www for our company website.
> 
> It works, when you go to http://www.mycompany.com; it resolves and it
> shows the website content.
> 
> But in addition, I want also some kind of redirection or mapping (i
> don't know what you called that) that when people go to
> http://mycompany.com (without www), it should forward also to the www
> server.
> 
> How to do it? Thanks in advance.

A redirect would be done with something other than DNS.
If your intention is that mycompany.com is the same host (that covers more
than just the web server) as www.mycompany.com, then you should make an
A record for mycompany.com similarly to what you did for mycompany.com.
The CNAME soultion is not preferred when you control both names, as that
causes extra processing on lookups.

If there are two hosts involved, then you need to run a web server on
mycompany.com and have it respond with appropiate redirect replies to
http/https requests.

You also may want to think about why you are doing this. If mycompany.com
and www.mycompany.com are envisioned to always be the same host, why
not just use one name for them (probably the one without the www). If they
ever might be different in the future, allowing both names to work now,
might cause you grief when you later try to split them apart.




More information about the fedora-list mailing list