Web Hosting Forum | Lunarpages


*
Welcome, Guest. Please login or register.
Did you miss your activation email?



Login with username, password and session length
February 09, 2012, 03:59:25 PM

Pages: [1]   Go Down
  Print  
Author Topic: PageRank and .htacess help  (Read 2085 times)
deadbeat
Pong! (the videogame) Master
*****
Offline Offline

Posts: 26


« on: March 31, 2009, 11:33:18 AM »

Currently, my site http://www.alternatesam.com is configured to be auto-redirected to http://alternatesam.com.

Do I still need to alter my .htacess file to 'make sure' Google knows this?

If I do, I plan to insert these lines into the file. Any errors?

ErrorDocument 404 http://www.alternatesam.com
RewriteEngine on
Options +FollowSymlinks
RewriteBase /
RewriteCond %{HTTP_HOST} !^www\.alternatesam\.com [NC]
RewriteRule ^(.*) http://www.alternatesam.com/$1 [L,R=301]
Logged
Mitch
Berserker Poster
*****
Offline Offline

Posts: 12838


WWW
« Reply #1 on: March 31, 2009, 12:25:06 PM »

Might double check with this post here:

http://wiki.lunarpages.com/Force_Domain_to_Use_%22www%22

Also, please do not create multiple threads about the same topic, thanks!
Logged

New to Web Site Hosting? Check Out the Lunarpages Blog Hosting Guide!


Follow us @lunarpages on Twitter!
Important Threads: Read This Before Posting! | Lunarforums Rules! | Mitch's Link of the Day!
Also, be sure to check out and subscribe to the Lunartics Blog and the Lunarpages Newsletter !

Need Web Hosting Help? Check out the Lunarpages Web Hosting Wiki. It has tons of tips, tutorials and resources!
MrPhil
Berserker Poster
*****
Offline Offline

Posts: 5083



« Reply #2 on: March 31, 2009, 02:36:26 PM »

If it is a permanent redirection (R=301), there's no need to do anything special for search engines.

Now, you say you are currently redirecting www.alternatesam.com to  alternatesam.com. Then, you give an .htaccess file to redirect alternatesam.com to www.alternatesam.com.  So which do you want to do?
Logged

deadbeat
Pong! (the videogame) Master
*****
Offline Offline

Posts: 26


« Reply #3 on: March 31, 2009, 10:40:39 PM »

Ok, I get what you mean. now without the www. will be directed to the one with the www. infront. If I changed this under my wordpress settings, is it still advisable to add


Options +FollowSymlinks
RewriteEngine on
rewritecond %{http_host} ^alternatesam.com [nc]
rewriterule ^(.*)$ http://www.alternatesam.com/$1 [r=301,nc]

into my htaccess file? I've tried it and it seemed like there's no differences but I'm wondering if its redundant.
Logged
MrPhil
Berserker Poster
*****
Offline Offline

Posts: 5083



« Reply #4 on: April 01, 2009, 07:38:35 AM »

Type in http://alternatesam.com. If the browser address bar shows http://www.alternatesam.com, your redirection (however you set it up) is working. Otherwise, use the .htaccess code you gave. By the way, the second NC flag is unnecessary (change it to L). You're matching anything with .*, so no need to specify case insensitivity in the rewrite rule.
Logged

deadbeat
Pong! (the videogame) Master
*****
Offline Offline

Posts: 26


« Reply #5 on: April 03, 2009, 07:55:18 AM »

If it is a permanent redirection (R=301), there's no need to do anything special for search engines.



Just wondering, if I just change this via wordpress setting, is this considered a permanent redirection? For example, abc.com will now go to www.abc.com, but is it a permanent redirection considering that I did not edit any file and just change it via a setting?
Logged
MrPhil
Berserker Poster
*****
Offline Offline

Posts: 5083



« Reply #6 on: April 04, 2009, 08:07:27 AM »

I'm not familiar with Wordpress (Mitch might be able to help). You could look in your .htaccess file to see if it's been updated by Wordpress, and contains appropriate RewriteCond and RewriteRule entries. If not, it could be in a <meta> "refresh" tag, which would not be a permanent redirection.
Logged

Mitch
Berserker Poster
*****
Offline Offline

Posts: 12838


WWW
« Reply #7 on: April 06, 2009, 05:59:20 AM »

If you change it via WordPress, it should change it for your overall domain, hence not needing the extra .htaccess redirect code.  Another thing you might want to look into is the Google Webmaster Tools.  I remember seeing in there a place where you can specify to Google which version (with or without www) you want them to archive in the search results.

http://wiki.lunarpages.com/Google_Webmaster_Tools
Logged

New to Web Site Hosting? Check Out the Lunarpages Blog Hosting Guide!


Follow us @lunarpages on Twitter!
Important Threads: Read This Before Posting! | Lunarforums Rules! | Mitch's Link of the Day!
Also, be sure to check out and subscribe to the Lunartics Blog and the Lunarpages Newsletter !

Need Web Hosting Help? Check out the Lunarpages Web Hosting Wiki. It has tons of tips, tutorials and resources!
Pages: [1]   Go Up
  Print  
 
Jump to: