Webmaster Forum


Go Back   Webmaster Forum > Web Development > Coding Forum

Coding Forum Problems with your code? Discuss coding issues, including JavaScript, PHP & MySQL, HTML & CSS, Flash & ActionScript, and more.


Closed Thread
 
LinkBack Thread Tools Display Modes
Share |
  #1 (permalink)  
Old 11-17-2011, 04:35 AM
Contributing Member
Latest Blog:
None

 
Join Date: 10-29-10
Posts: 539
iTrader: 0 / 0%
Redirect http:// to http://www. ? Why & how?

Hello,

I have two functional web addresses, the one with- and the one without "www":

http://mysite.com

http://www.mysite.com

I heard it can hurt to have two "versions". What can I do to keep the "www" version only?

Redirect, I suppose. And how do I do that?

What would be the risks of still having both ways? Would that hurt SERPs?

Last edited by HTMLBasicTutor; 11-17-2011 at 09:50 AM.
 
  #2 (permalink)  
Old 11-17-2011, 08:46 AM
LGR's Avatar
LGR LGR is offline
Contributing Member
 
Join Date: 10-20-11
Location: The Great White North
Posts: 85
iTrader: 0 / 0%
This is what I use on some sites.

Code:
RewriteEngine On RewriteCond %{HTTP_HOST} ^mysite\.com$ [NC] RewriteRule ^(.*)$ http://www.mysite.com/$1 [R=301,L]
It needs to go in the .htaccess file on the root of the web folder. I use it on Apache so if you are on an Apache server it should work.
__________________
Read the new Livedrive review!
WordPress Paradise - A forum for WordPress users.
 
  #3 (permalink)  
Old 11-17-2011, 09:54 AM
HTMLBasicTutor's Avatar
Super Moderator
 
Join Date: 10-29-07
Location: British Columbia, Canada
Posts: 18,104
iTrader: 5 / 100%
This has been asked a ton of times here.

301 Permanent Redirect
Basic 301 Permanent Redirect

Please search the forums before asking a question.
__________________

HTML Basic Tutor - Learn how to code for better SEO
Basic Computer Information - Computer & internet basics for website owners

SEO troubleshooting and review services available. - Pm me.
 
Go Back   Webmaster Forum > Web Development > Coding Forum

Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
http://v7n.com/forums/ versus http://www.v7n.com/forums/ chicgeek V7N Forum Support 9 02-15-2009 05:26 AM
http:// vs http://www Dup Content theChronic Google Forum 2 06-13-2006 03:58 AM
http://www vs. http:// ?? optycont SEO Forum 7 04-11-2005 09:01 PM
http://www. or http://sitename DOS SEO Forum 3 09-04-2004 11:36 PM


V7N Network
Get exposure! V7N I Love Photography V7N SEO Blog V7N Directory


All times are GMT -7. The time now is 03:24 AM.
Powered by vBulletin
Copyright © 2000-2013 Jelsoft Enterprises Limited.
Copyright © 2003 - 2013 Escalate Media LP




Search Engine Optimization by vBSEO 3.6.0 RC 2 ©2011, Crawlability, Inc.