Don't want www in URL

This is a discussion on Don't want www in URL within the Apache Web Server forums, part of the Web Server and Related Forums category; Hi Apache Gurus, I'm trying to set up our website such that it can be accessed using the domain ...


Go Back   Usenet Forums > Web Server and Related Forums > Apache Web Server

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 07-26-2004
Charles Kendricks
 
Posts: n/a
Default Don't want www in URL

Hi Apache 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??
  #2 (permalink)  
Old 07-26-2004
johannes m.r.
 
Posts: n/a
Default Re: Don't want www in URL

cktech@charter.net (Charles Kendricks) wrote:
> 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??


You'll have to check both, your DNS and httpd.conf. In httpd.conf look
for the "ServerName" directive and change its value.
For DNS, I don't know enough to help you. You might want to ask in
some DNS specific group and I guess it also depends on the DNS daemon
used.
Regards,
johannes
  #3 (permalink)  
Old 07-26-2004
Justin Koivisto
 
Posts: n/a
Default Re: Don't want www in URL

Charles Kendricks wrote:

> Hi Apache 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??


May need to do some router work...

httpd.conf: change "ServerName www.example.com" to "ServerName example.com"

Then for the DNS part, if you have other services on different servers
running under the domain name without using A records (ie - "www",
"mail", etc.), then you will need to do some kind of port forwarding for
port 80 of the current exaple.com server to forward requests to the web
server via IP address.

--
Justin Koivisto - spam@koivi.com
PHP POSTERS: Please use comp.lang.php for PHP related questions,
alt.php* groups are not recommended.
  #4 (permalink)  
Old 08-02-2004
D. Stussy
 
Posts: n/a
Default Re: Don't want www in URL

On Mon, 26 Jul 2004, Justin Koivisto wrote:
> Charles Kendricks wrote:
> > Hi Apache 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??

>
> May need to do some router work...
>
> httpd.conf: change "ServerName www.example.com" to "ServerName example.com"
>
> Then for the DNS part, if you have other services on different servers running
> under the domain name without using A records (ie - "www", "mail", etc.), then
> you will need to do some kind of port forwarding for port 80 of the current
> exaple.com server to forward requests to the web server via IP address.


The above is incomplete, but is on the right track. I allow a leading "www" on
requests to my server, but ignore it. It should probably be inside a virtual
host construct.

ServerName: example.com (as above)
ServerALIAS: www.example.com (and any other aliases)
UseCanonicalName: ON
- That forces the rewritten domain name into the HTTP response. However,
watch out for other side effects.



DNS Records:

www.example.com. IN CNAME example.com. ; ONLY record for www.*
example.com. IN A 10.0.0.0 ; Real IP address goes here.

(That's what is needed for what the other response calls "port forwarding.")
 


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 11:39 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0