Reply
www versus no-www for my domain?
Old 07-15-2006, 02:40 AM www versus no-www for my domain?
imported_Keyz's Avatar
design & music... mmmm

Posts: 111
I've been reading up tonight about having www vs. no-www in my domain name. I read a good bit about it, and it seems I should go ahead and do it (and from testing out a number of sites, i.e. shoemoney.com/perfume.com/etc, I see that most people do this). What I wasn't sure about was the exact right way to do it. I did find a few recommendations of what to add to my .htaccess file, though I would much much rather trust what you guys have to say than a random site I came across hehe - I don't want to accidently offend the mighty google bot. For my domain, I'd like to force it to always have the www.

On a side-note.... I also noticed an additional benefit to sticking to one form of the domain: when you go to a site (i.e. earnersforum.com) where a cookie has stored your login data, you will only be logged in if you go to the type of domain you logged in at (i.e. when I logged in at www.earnersforum.com but later came back to the site by typing just earnersforum.com, I was shown as not logged in... when I switched to the www version, I was logged in).

So anyhow, I would greatly appreciate it if you guys could inform me of what code "you" use use and trust to set this option for your own sites. No doubt it's more simple than I think haha, but oh well.

Thanks you guys!
imported_Keyz is offline
Reply With Quote
View Public Profile Visit imported_Keyz's homepage!
 
When You Register, These Ads Go Away!
Old 07-15-2006, 03:42 AM For Apache
Pearse's Avatar
Extreme Talker

Posts: 193
RewriteEngine On
RewriteCond %{HTTP_HOST} ^yoururl\.com [nc]
RewriteRule (.*) http://www.yoururl.com/$1 [R=301,L]


save this file(or ad this line to your existing) as .htaccess with "all files" selected in notepad(replace "yoururl" with your domain name). upload it to your
root. Nice observation skills on that cookie. You now have a very good example for anyone(clients who dont belive the results of a site: query?) you may be trying to convince about canonical url issues.
__________________
My favorite blog is BlueHat SEO. Definetly worth a read, and will probably inspire some new project that is going to take up some of your valuable time.
Pearse is offline
Reply With Quote
View Public Profile
 
Old 07-15-2006, 03:44 AM
Avid marketing fan

Posts: 81
You can use a 301 redirect by adding this to your .htaccess (replace "domain" with whatever your domain is; also change the extension if it's not a .com)

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} !^www\.domain\.com [NC]
RewriteRule ^(.*) http://www.domain.com/$1 [L,R=301]
</IfModule>
__________________
Arbitrage Tactics - Traffic Arbitrage Revealed! 5 spots remaining...
Read the story of a 26-year old millionaire - How did he do it?
imported_internetguy is offline
Reply With Quote
View Public Profile Visit imported_internetguy's homepage!
 
Old 07-15-2006, 05:02 AM
Junior Talker

Posts: 69
Hi, I prefer my domains without the "www." (I find it meaningless and it adds 4 unnecessary letters to the domain name) and redirect always with something like this (Apache - .htaccess):

Code:
RewriteCond %{HTTP_HOST} ^www.domain\.tld [nc]
RewriteRule (.*) http://domain.tld/$1 [L,R=301]
But regardless of which version you choose, it is important that you consistently redirect to the chosen version.

As for the cookie - it is possible to set a cookie for a site and all its subomains.
lenz is offline
Reply With Quote
View Public Profile
 
Old 07-15-2006, 05:21 AM
imported_Keyz's Avatar
design & music... mmmm

Posts: 111
Thanks you guys, I got it

lenz... yeah I do kinda like it without as well, though at this point for this particular site, I don't think I ought to switch (i.e. zillions of backlinks with www ... ok not zillions, but close.... sorta)

I'll keep the method in mind though for the future. Heh in my digging into this topic this evening I even ended up learning some about mod_rewrite, regular expressions, and the like... go figure haha

By the way Pearse... I dig your site, good job! Is it based around a custom CMS, or anything open source?

Thanks!
imported_Keyz is offline
Reply With Quote
View Public Profile Visit imported_Keyz's homepage!
 
Old 07-15-2006, 07:12 AM
Pearse's Avatar
Extreme Talker

Posts: 193
Its proprietary CMS that is constantly be reworked. Fun times though.
__________________
My favorite blog is BlueHat SEO. Definetly worth a read, and will probably inspire some new project that is going to take up some of your valuable time.
Pearse is offline
Reply With Quote
View Public Profile
 
Old 07-15-2006, 01:27 PM
Junior Talker

Posts: 48
Am I the only idiot out there just serving both up via DNS? I tend to drop the www whenever I'm promoting the site, most specifically because the name is rather longish (kamikazelabs.com), and on the offchance that somebody felt they needed to type the URL, it's easier not give them the www.

Another thing though, is that I usually make the href with the www, while the plaintext display is without it. I've never noticed any significant difference between users hitting one or the other, as I've always just served both, via DNS, to the same apache host.
bmelton is offline
Reply With Quote
View Public Profile Visit bmelton's homepage!
 
Reply     « Reply to www versus no-www for my domain?
 

Thread Tools

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 On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Webmaster Resources Marketplace:
Software Development Company | Webhosting.UK.com | Text Link Brokers 


   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.14796 seconds with 12 queries