Jump to content

  • Log in with Facebook Log in with Twitter Log In with Google      Sign In   
  • Create Account

Subscribe to HRA Now!

 



Are you a Google Analytics enthusiast?

Share and download Custom Google Analytics Reports, dashboards and advanced segments--for FREE! 

 



 

 www.CustomReportSharing.com 

From the folks who brought you High Rankings!



Photo
- - - - -

Www And Non-Www


Best Answer Michael Martinez , 06 August 2015 - 10:46 AM

If you are using Apache Web server (Linux/UNIX) AND ...

If you can implement a sitewide redirect through your control panel then do that OR ...

If you can edit an .htaccess file then try this:
 

RewriteEngine on 
RewriteCond %{HTTP_HOST} ^example.com [NC] 
RewriteRule ^(.*)$ http://www.example.com/$1 [L,R=301] 
HOWEVER, this assumes that everything without the www. prefix is served exactly the same way as everything WITH the www. prefix. Go to the full post


  • Please log in to reply
2 replies to this topic

#1 AvyGuttman

AvyGuttman

    HR 3

  • Members
  • PipPipPip
  • 95 posts
  • Location:Montreal, Quebec, Canada

Posted 06 August 2015 - 07:15 AM

Hello, hope you are well. Here is what is probably a simple question but no search online has provided an answer.

 s

1) I have added a website to webmaster tools (search console) twice. The www version and non www version

 

2) Chose the www as the preferred version a month ago 

 

3) Have no idea when this change officially took or takes effect

 

4) Am moving over many pages from old site to new site with the same domain name

 

5) Do the 301 redirects have to have to be written as "http://www.website.c...ry/oldpage.html" or is it ok to

write it out as "/oldcategory/oldpage.html"

 

6)If there are instances where www and non www pages exist, and need to be 30 redirected to new website, can I simply

redirect the non www pages and assume the www will follow? 

 

Thanks!



#2 Michael Martinez

Michael Martinez

    HR 10

  • Active Members
  • PipPipPipPipPipPipPipPipPipPip
  • 5,325 posts
  • Location:Georgia

Posted 06 August 2015 - 10:46 AM   Best Answer

If you are using Apache Web server (Linux/UNIX) AND ...

If you can implement a sitewide redirect through your control panel then do that OR ...

If you can edit an .htaccess file then try this:
 
RewriteEngine on 
RewriteCond %{HTTP_HOST} ^example.com [NC] 
RewriteRule ^(.*)$ http://www.example.com/$1 [L,R=301] 
HOWEVER, this assumes that everything without the www. prefix is served exactly the same way as everything WITH the www. prefix.

Edited by Michael Martinez, 06 August 2015 - 10:47 AM.

  • AvyGuttman likes this

#3 AvyGuttman

AvyGuttman

    HR 3

  • Members
  • PipPipPip
  • 95 posts
  • Location:Montreal, Quebec, Canada

Posted 06 August 2015 - 10:48 AM

Thank you Michael. 






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

We are now a read-only forum.
 
No new posts or registrations allowed.