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
- - - - -

About 301 Redirects...


  • Please log in to reply
6 replies to this topic

#1 Pete L

Pete L

    HR 3

  • Active Members
  • PipPipPip
  • 103 posts

Posted 28 June 2009 - 08:15 PM

Hi,

I'm trying to decide if I want to do a 301 redirect and if so how. My situation is as follows:

If I type in the site or the www, both work and the browser address keeps what I type. (Note - I tried typing in Highrankings.com/forum and it redirected to: www.Highrankings.com/forum.

I checked Google. My Index page is WITHOUT www. but a mix of the 38 Google indexed pages start with www.

This site has no back links, so I don't have a problem there, just with internal links.

I did this to myself, as this is an older site I set up where I used absolute www internal links instead of relative page links.

I can now either redirect to make the site name and the www site name one in the same or I can leave it and just make sure I link to those pages with the way Google has them listed. Of course,, you cannot control how other sites link to you, which is a reason I'm considering the 301 before I start looking for back links.

I'd like to know if the users here feel a permanent 301 wildcard redirect is a good idea and if so...

1) Redirect form the site name to the www.site name or...

2) Redirect form the www.site name to the site name?

(That may not make a difference, but I'd thought I'd ask it, anyway.)


Thanks for any advice,

Pete

#2 Randy

Randy

    Convert Me!

  • Moderator
  • 17,540 posts

Posted 28 June 2009 - 09:31 PM

It doesn't make a difference whether you choose the www or non-www version. They're both fine with the search engines.

You do however usually want to offer either one or the other. Many times the search engines will figure it out themselves and index only one or the other. Based upon the fact that you're seeing both in the search engines, your site has not yet gotten to this point. So you'll want to put some type of 301 redirect in place to keep things nice and clean.

How depends upon what type of server your site is on and what its capabilities are. If you can tell us if you're on a IIS (Windows) server or Unix/Linux server it would be helpful. In fact, with that information you find what you need to use here on the forums in the 301 redirects section. Where I"ll be moving your question to in just a second.

#3 Pete L

Pete L

    HR 3

  • Active Members
  • PipPipPip
  • 103 posts

Posted 28 June 2009 - 09:50 PM

QUOTE(Randy @ Jun 28 2009, 10:31 PM) View Post
How depends upon what type of server your site is on and what its capabilities are. If you can tell us if you're on a IIS (Windows) server or Unix/Linux server it would be helpful. In fact, with that information you find what you need to use here on the forums in the 301 redirects section. Where I"ll be moving your question to in just a second.


This particular site is on a Linux with an Apache server. Cpanel control system. Since Google already has the Index page set without the www, it seems logical to me to redirect the www to the site name:

It seems like I accomplish that by doing:


Type: Permanent (301)

CODE
http://www.mysite.com

redirects to: http://mysite.com


Check - Only redirect with www.

Check - Wild Card Redirect.

---------------------------------------

As I understand it, the wild card redirect causes any url page, starting with www., to redirect to the site name with the same directory and page name.

Sound right? And thanks for the previous reply.

Pete

#4 Pete L

Pete L

    HR 3

  • Active Members
  • PipPipPip
  • 103 posts

Posted 29 June 2009 - 12:49 AM

Well, this is a bit off topic, but I found it funny.

"While we expect this command will help us solve many of the more complex duplicate content issues, we still highly recommend that webmasters follow the existing best practices for normalizing their URLs through domain canonicalization and normalization of URL parameters. We’ll provide more details on the link tag after we’ve implemented full support in one of our upcoming releases. In the meantime, we look forward to hearing your feedback on the new tag."

-- Nathan Buggia, Live Search Webmaster Team

Anyway, the link ended up to be a 404 page, oops! (And they wonder why Apple keeps taking away market share, oh well.)

There was an interesting discussion there about a new tag coming out:

<link rel="canonical" href="http://mysite.com"/>

It is supposed to help you identify the canonical site for the search engines. The site stated Google, Yahoo, and Live Search were all working together to support it.

Another alternative I discovered in HTML is the <base> tag. I mean I get that all search engines reduce links to absolute links; so, I really don't see purpose except that by defining the base URL, you are also identifying the canonical name of your site.

I think I'm tending towards seeing some better seo indexing on pages I created with absolute links but there are so many other factors to consider, I hardly feel this assumption to be a reliable one.

Pete


#5 Randy

Randy

    Convert Me!

  • Moderator
  • 17,540 posts

Posted 29 June 2009 - 07:02 AM

QUOTE
his particular site is on a Linux with an Apache server. Cpanel control system. Since Google already has the Index page set without the www, it seems logical to me to redirect the www to the site name


Okie, assuming something close to a standard setup the following in a .htaccess file uploaded to the root level of the site should do the trick.

CODE
Options +FollowSymlinks
RewriteEngine on
RewriteCond %{HTTP_HOST} !^mysite\.com [NC]
RewriteRule ^(.*)$ http://mysite.com/$1 [R=301,L]


The main things to watch out for when editing for your site are:

1. Make sure you use a plain text editor when creating the .htaccess file. Software like Word may add invisible text formatting characters that will mess things up.

2. Make sure you keep a backward slash (\) in there in the RewriteCond. It may look like a typo, but it actually escapes the period character in the domain name. Periods have a special meaning, so you need to escape them so that they're treated as a literal character.

Regarding Canonical Meta, using Google's WMT to set the default and other methods available to control these canonical issues, they all work to some degree. None of them however are as foolproof as setting up real 301's to do the heavy lifting.

#6 Pete L

Pete L

    HR 3

  • Active Members
  • PipPipPip
  • 103 posts

Posted 29 June 2009 - 01:37 PM

Hi Randy,

Here's what I ended up with, very close to what you posted:

CODE
RewriteEngine on
RewriteCond %{HTTP_HOST} ^mysite.com$
RewriteRule ^(.*)$ "http\:\/\/www\.mysite\.com\/$1" [R=301,L]



I'm not sure why it uses the \/\/ slash patten, but it worked.

Anyway, thanks a bunch for pointing me in that "redirection." roflmao.gif

By the way, I decided to redirect it the way you guys here do, Google does, and Yahoo does, to the www.

Thanks a bunch,

Pete

#7 Randy

Randy

    Convert Me!

  • Moderator
  • 17,540 posts

Posted 29 June 2009 - 02:29 PM

Hey, as long as it works that's all that counts!

Different servers have different configs, which is why something might work on one and not on another server with identical hardware. As a general rule the backslashes are meant to escape special characters, though for the life of me I don't know why you'd need them in that part of a rewrite rule.




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.