lauch new site with “www” prefix or without?
Posted: 27 June 2008 11:05 AM   [ Ignore ]  
Grad Student
Avatar
Rank
Total Posts:  93
Joined  11-06-2007

I’m getting ready to launch a new website and debating the issue of including a “www” prefix to the url.  From what I understand I should choose one way or the other for the entire site.

Is there an advantage to choosing one over the other?  It seems to me that removing the prefix allow for a shorter url which is obviously a bonus.

What approach have you folks taken?

thanks…

Profile
 
 
Posted: 27 June 2008 11:08 AM   [ Ignore ]   [ # 1 ]  
Moderator
Avatar
RankRankRankRankRankRankRank
Total Posts:  15368
Joined  05-15-2004

I found that users tend to expect both versions to work, so that’s what I accomodate. I use Google’s webmaster tools to let them know that the site is one and the same, and that works very well.

 Signature 

Everything will be good in the end. If it’s not good, it’s not the end.

Profile
MSG
 
 
Posted: 27 June 2008 12:16 PM   [ Ignore ]   [ # 2 ]  
Grad Student
Avatar
Rank
Total Posts:  66
Joined  09-15-2007

I agree with Ingmar, my sites work both ways.

 Signature 

Joe Michaud

Profile
 
 
Posted: 27 June 2008 12:19 PM   [ Ignore ]   [ # 3 ]  
Grad Student
Avatar
Rank
Total Posts:  93
Joined  11-06-2007

Yes, it works both ways, but one redirects to the other.  The question is about choosing the primary destination.  I’m leaning toward including the “www” as it seems more popular.  Thanks for the discussion.

Profile
 
 
Posted: 27 June 2008 12:51 PM   [ Ignore ]   [ # 4 ]  
Grad Student
Avatar
Rank
Total Posts:  66
Joined  09-15-2007

Though I haven’t explored the implications, I use my DNS configuration to direct traffic appropriately.
- The A record points example.com to the ip address

Then EITHER
- Another A record points www.example.com to the same ip address
OR
- A CNAME record points www.example.com to example.com

For those of you watching this thread who are a little more knowledgeable, I’d be interested in knowing more about the advantages & disadvantages of using DNS vs redirects.

 Signature 

Joe Michaud

Profile
 
 
Posted: 27 June 2008 12:57 PM   [ Ignore ]   [ # 5 ]  
Summer Student
Total Posts:  20
Joined  04-20-2007

I totally agree: use both versions. Advertise with the “www.” domain, because that is what most users expect.

Profile
 
 
Posted: 27 June 2008 01:18 PM   [ Ignore ]   [ # 6 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  276
Joined  06-12-2002

There’s also the consideration of subdomain cookies. A better explanation is here at Yahoo’s site optimization tips page, but the basic rundown is:

- The web server can serve stuff faster if it doesn’t have to deal with cookies, since cookies are extra network traffic.
- If you use domain.com as your main destination, the way most cookie setups work the cookies will work on domain.com, xyz.domain.com, and images.domain.com (assuming those are all on the same server).
- However, if you use www.domain.com as your main destination, you can set cookies to only apply to www.domain.com, leaving all other subdomains untouched.
- This is a good thing if you want to serve static components like images using a different subdomain name.

If you don’t have the ability to repoint your root domain (even those of us who can manipulate our DNS through our webhost often can’t change THAT setting), or don’t wish to for whatever reason, you can easily handle the non-www case with mod_rewrite in your .htaccess file as follows:

Options +FollowSymLinks
RewriteEngine On
RewriteBase
/
RewriteCond %{HTTP_HOST} ^domain\.com [NC]
RewriteRule
^(.*)$ http://www.domain.com/$1 [L,R=301]

Profile
 
 
Posted: 27 June 2008 05:06 PM   [ Ignore ]   [ # 7 ]  
Grad Student
Avatar
Rank
Total Posts:  89
Joined  11-05-2007

IMO it depends on the nature of the site. Web 2.0 sites in particular seem fond of dropping the www, but there are good arguments on both sides.

Personally I always use the www., and redirect users to that. I like the way it looks, what can I say.

Profile
 
 
Posted: 27 June 2008 09:00 PM   [ Ignore ]   [ # 8 ]  
Grad Student
Avatar
Rank
Total Posts:  80
Joined  12-29-2005

I’ve always rather disliked the “www” prefix for web servers. It has become so common that everyone is accustomed to both seeing and saying it, and so it’s sort of invisible now, but it really is a goofy convention.

John Gruber, Daring Fireball

Profile
 
 
Posted: 28 June 2008 03:30 AM   [ Ignore ]   [ # 9 ]  
Summer Student
Total Posts:  15
Joined  01-30-2008
Joe Michaud - 27 June 2008 12:51 PM

For those of you watching this thread who are a little more knowledgeable, I’d be interested in knowing more about the advantages & disadvantages of using DNS vs redirects.

i actually don’t know how the DNS stuff works, but i suspect it could be a bit faster that the redirects.

The redirects actually require a second request/response round trip from your browser to the web server.

You can simulate this via cmd line with a HTTP request to craigslist:

/——-
telnet craigslist.org 80

GET / HTTP/1.0
Host: craigslist.org

——-/

The response you get:

/——-
HTTP/1.1 302 Found
Content-Type: text/html; charset=iso-8859-1
Connection: close
Location: http://www.craigslist.org/
Date: Sat, 28 Jun 2008 09:17:59 GMT
Server: Apache/1.3.37 (Unix) mod_gzip/1.3.26.1a mod_perl/1.29

<!DOCTYPE HTML PUBLIC “-//IETF//DTD HTML 2.0//EN”>
<HTML><HEAD>
<TITLE>302 Found</TITLE>
</HEAD><BODY>
<H1>Found</H1>
The document has moved <A >here</A>.<P>
<HR>
<A>Apache/1.3.37 Server at sfbay.craigslist.org Port 80</ADDRESS>
</BODY></HTML>
——-/

When your browser sees that ‘Location’ header, it doesn’t even both to render the HTML page data below—it just immediately makes a brand new request for whatever URL is there - in this case, it’s using the ‘www’ version. So, it happens very quickly and invisibly to the user, but I suppose it could be meaningful if you want uber-fast performance.

I suspect a DNS-based solution would not require this 2nd round trip request. Instead, the web server would just recognize what content you were asking for and serve the appropriate content. Of course, in the previous case, the URL in the browser changes to the ‘www’ version, whereas this DNS solution would not (assuming my guess is correct about how it works).

Profile
 
 
Posted: 28 June 2008 10:35 AM   [ Ignore ]   [ # 10 ]  
Grad Student
Avatar
Rank
Total Posts:  66
Joined  09-15-2007

Thanks for the awesome explanation, shmooth!

I don’t think one extra HTTP request is all that big of a deal…  Though I am a bit of a stickler for minimizing them.  I do little things like { embed } all of my supporting style sheets into my main one so that they are all served with a single request…  Ditto with JavaScript files.  But yea, not a big hit in terms of performance.

With the DNS method I have 2 different urls (example.com & www.example.com) that serve up the same site.  Can anyone comment on the SEO implications?

 Signature 

Joe Michaud

Profile
 
 
Posted: 28 June 2008 10:53 AM   [ Ignore ]   [ # 11 ]  
Research Scientist
Avatar
RankRankRankRankRankRank
Total Posts:  5891
Joined  11-23-2003

Take a look at this post from Matt Cutts.

 Signature 

EE 2.0:  A designers dream becomes a developers dream | Follow me on Twitter.

Profile
 
 
   
 
 
Post Marker Legend
New Topic New posts Hot Topic Hot Topic with new posts New Poll New Poll Moved Topic Moved Topic Sticky Topic Sticky topic
Old Topic No new posts Hot Old Topic Hot Topic with no new posts Old Poll Old Poll Closed Topic Closed Topic Announcement Announcements
Theme
Change Theme
Visitor Statistics
The most visitors ever was 1149, on July 16, 2007 09:33 AM
Total Registered Members: 64908 Total Logged-in Users: 32
Total Topics: 81852 Total Anonymous Users: 22
Total Replies: 440059 Total Guests: 237
Total Posts: 521911    
Members ( View Memberlist )