No More www

No More www

You can shave a few bytes off your URLs and make them friendlier by not requiring the www . at the beginning of your domain name . Have your system administrator set your DNS server to resolve and , like this:

 ServerName  ServerAlias 

This allows users to type in to get to . If you are on a server with named-based virtual hosting, you also need to add a ServerAlias directive inside the appropriate VirtualHost , like this:

 NameVirtualHost  <VirtualHost>     ServerName     ServerAlias     [...] </VirtualHost> 

The ServerAlias directive in Apache specifies alternate names for a host. Some system administrators also provide misspellings and other alternate domains, like this:


You also can use a wildcard to match anything before the dot like this:

 ServerAlias * 

It is important to provide an IP address for your domain; otherwise , Apache will be forced to perform a reverse DNS lookup.

You always need the DNS configuration; otherwise, the client won't find the server. The web configuration is needed only if you use name-based virtual hosting on the IP. Some high-profile sites still require the www . to access their sites. Three examples at press time are, morningstar .com, and Requiring users to type in the www . to get to your site is like throwing traffic away.


Speed Up Your Site[c] Web Site Optimization
Speed Up Your Site[c] Web Site Optimization
ISBN: 596515081
Year: 2005
Pages: 135 © 2008-2017.
If you may any questions please contact us: