This is a discussion on Domain Name Website Naming within the Linux Administration forums, part of the Linux Forums category; Hi Linux Gurus, I'm trying to set up our website such that it can be accessed using the domain ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Hi Linux Gurus,
I'm trying to set up our website such that it can be accessed using the domain name only, and without having to use the "www." before the domain name. It seems to me that I should be able to accomplish this either through DNS, or httpd.conf, but haven't been able to figure it out yet. I'm running RH9, with Apache. Any suggestions?? |
|
|||
|
Charles Kendricks <cktech@charter.net> wrote:
> the domain name only, and without having to use the "www." before the > domain name. Just have the www and the 'plain' domain pointing to the same machine in the DNS. Apache will answer unless you setup VirtualHosting, in this case use the ServerAlias directive. Davide -- | In a medium in which a News Piece takes a minute and an "In-Depth" | Piece takes two minutes, the Simple will drive out the Complex. -- | Frank Mankiewicz | |
|
|||
|
On Mon, 26 Jul 2004 07:33:05 -0700, Charles Kendricks wrote:
> Hi Linux Gurus, > > I'm trying to set up our website such that it can be accessed using > the domain name only, and without having to use the "www." before the > domain name. It seems to me that I should be able to accomplish this > either through DNS, or httpd.conf, but haven't been able to figure it > out yet. I'm running RH9, with Apache. Any suggestions?? In your domain's zone file: foobar.net. IN A 123.231.34.56 www.foobar.net. IN A 123.231.34.56 |
|
|||
|
Dave Uhring wrote:
> On Mon, 26 Jul 2004 07:33:05 -0700, Charles Kendricks wrote: > > >>Hi Linux Gurus, >> >> I'm trying to set up our website such that it can be accessed using >>the domain name only, and without having to use the "www." before the >>domain name. It seems to me that I should be able to accomplish this >>either through DNS, or httpd.conf, but haven't been able to figure it >>out yet. I'm running RH9, with Apache. Any suggestions?? > > > In your domain's zone file: > > foobar.net. IN A 123.231.34.56 > www.foobar.net. IN A 123.231.34.56 > In DNS, do the following: foobar.net. IN A 123.231.34.56 www.foobar.net. IN CNAME foobar.net. The first sets up the absolute name resolution, the second sets up the alias to the original (essentially). |
|
|||
|
Ken K wrote:
> Dave Uhring wrote: > >> On Mon, 26 Jul 2004 07:33:05 -0700, Charles Kendricks wrote: >> >> >>>Hi Linux Gurus, >>> >>> I'm trying to set up our website such that it can be accessed using >>>the domain name only, and without having to use the "www." before the >>>domain name. It seems to me that I should be able to accomplish this >>>either through DNS, or httpd.conf, but haven't been able to figure it >>>out yet. I'm running RH9, with Apache. Any suggestions?? >> That is not strictly " a correct" way of setting up a web server. A URL consistes of a host followed by a domain name. Although you can set it up to work on just a "domain name" it is not correct. >> >> In your domain's zone file: >> >> foobar.net. IN A 123.231.34.56 >> www.foobar.net. IN A 123.231.34.56 >> > > In DNS, do the following: > > foobar.net. IN A 123.231.34.56 > www.foobar.net. IN CNAME foobar.net. > > The first sets up the absolute name resolution, the second sets up the > alias to the original (essentially). Ahem, The first one isn't strictly correct as it is a domain name. Due to folks setting up mail servers incorrectly most folks think it is correct but it isn't. You can find it in on the the RFC's ( I don't recall which one and I am not going to look it up ). ;) I don't think that foobar the host is in the .net domain. Your zone file should be something like this: $ORIGIN foobar.net. @ 86400 IN SOA www.foobar.net webmaster.foobar.net ( 2004013101 ; serial 3600 ; refresh after 3 hours 600 ; retry after 1 hour 3600000 ; expire after 1 week 86400 ) ; ttl 1 day 86400 IN NS ns.foobar.net. ; ; hosts ; www 86400 IN A 123.231.34.56 ; ; aliases ; mail 86400 IN CNAME www.foobar.net. ns 86400 IN CNAME www.foobar.net. -- There are 10 types of people in this world Those that understand binary and those that don't |