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

Permanent 301 Redirect


  • This topic is locked This topic is locked
320 replies to this topic

#226 hostw3

hostw3

    HR 1

  • Members
  • Pip
  • 5 posts

Posted 28 November 2005 - 08:58 PM

Randy,

Thank you so much for the help. It worked perfectly. I was redirecting domain3.com to a single page as we had purchased a domain that had expired and wanted visitors going to the expired domain to have the correct information. This is a great forum with some very valuable information. Thanks again!!!

Joseph Martin

#227 ThreeD

ThreeD

    HR 2

  • Members
  • PipPip
  • 16 posts
  • Location:Online

Posted 30 November 2005 - 01:32 PM

I'm using cpanel and I have a ton of domains parked, pointing to one and the same domain. Is it possible to do a 301 redirect on ALL parked domains at once, or do I have to create an account for each individual domain and add the .htaccess file manually?

Thanks in advance smile.gif

#228 Jill

Jill

    Recovering SEO

  • Admin
  • 32,967 posts

Posted 30 November 2005 - 01:50 PM

Welcome ThreeD! bye1.gif

If you can create just 1 extra account you can do it as discussed in my Redirecting Multiple Domains article.

#229 Randy

Randy

    Convert Me!

  • Moderator
  • 17,540 posts

Posted 30 November 2005 - 02:29 PM

Are the other domains already pointing at the main domain ThreeD?

If so, a negative match placed only in the .htaccess of the main domain should do the trick.

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


#230 ThreeD

ThreeD

    HR 2

  • Members
  • PipPip
  • 16 posts
  • Location:Online

Posted 30 November 2005 - 03:27 PM

Thanks Jill and Randy smile.gif

Jill - great article - I'll give it a try. My question to your article however is, wouldn't it almost be the same procedure and (Google blacklist) problem if you park all domains on top of the 301 redirect domain (www.domain2.com) as if you were to park all domains on top of the main domain (www.domain1.com)? To the SE spiders it would all still look as if they all were the same site, or am I wrong?

I guess as long as this method is just as PR / spider efficient as creating individual cpanel accounts for each domain, make a .htaccess file with a 301 redirect to the main domain from the secondary domain, I am very happy.

I also read that yahoo spiders had problems with the 301 redirect, do you know if that has gotten any better since last year?

Randy - they aren't exactly pointing to the main domain, but they are parked "on top" of the main domain. If you enter www.domain2.com you'll see the page www.domain1.com. Do you have an example of how you would place that negative match in the .htaccess file of domain1.com?

Thanks to you both, appreciate the great feedback smile.gif

#231 Jill

Jill

    Recovering SEO

  • Admin
  • 32,967 posts

Posted 30 November 2005 - 06:23 PM

QUOTE
To the SE spiders it would all still look as if they all were the same site, or am I wrong?


No, it's not the same at all. One is just parked domains that don't redirect (and have the potential to get indexed under that domain). And my way is a true redirect so only the 1 main domain can and will get indexed.

It's how I do all my domains now and it works like a charm!

#232 Randy

Randy

    Convert Me!

  • Moderator
  • 17,540 posts

Posted 30 November 2005 - 07:21 PM

Just to make sure we're talking about the same thing since different people use different terminology...

1. You've got all of your content on domain1.com.
2. domain2.com is parked on top of domain1.com, so when someone goes to domain2.com they see the content from domain1.com but the address bar in their browser still says domain2.com.
3. The same thing goes with domain3.com, domain4.com, etc.

Is this correct?

If so the above negative match will catch all of those for you.

What it does --in as close as I can get it to English-- is look at the original request to see what URI is being asked for. If the baseURL is anything other than www.domain1.com, it issues a 301 permanent redirect to send the visitor to your main domain. If a specific page name was requested it'll also pass this along so that folks still end up on the correct page.

In essence it takes care of parked/aliased domains and the www/non-www issue all in one fell swoop.

Usage is just to put the .htaccess at the root level of where your files are stored for your main domain.

#233 greentea

greentea

    HR 2

  • Banned
  • PipPip
  • 26 posts

Posted 30 November 2005 - 08:49 PM

Hi,

We have many domains currently parked at the same IP so that they are set to redirect to a single domain, e.g. 1.com. We would really prefer to redirect some of them to 2. com, 3.com, etc. instead. In which case, can we still park them at the same IP? If yes, how do we do the redirection to the various domains? Or do we really have to park them on separate IPs?

Thanks.

#234 Jill

Jill

    Recovering SEO

  • Admin
  • 32,967 posts

Posted 30 November 2005 - 10:40 PM

I'm no expert, but I believe in this thread there is some code to put in your .htaccess file that would do this (assuming you're on an apache server). Have you browsed through the rest of this thread, greentea?

#235 greentea

greentea

    HR 2

  • Banned
  • PipPip
  • 26 posts

Posted 30 November 2005 - 11:09 PM

Hi Jill,

Thank you for your reply. Yes, I had browsed through the rest of this thread, but I am very lost among all these posts. unsure.gif

You see, I'm using something like this in our Apache httpd.conf:

Redirect 301 / http://www.1.com/

If I want to redirect some parked domains, say redirectinga.com to 2.com and and redirectingb.com to 3.com instead, while the rest of the domains continue to be redirected to 1.com, do I keep all of them on the same IP and then do the following?

Redirect 301 http://www.redirectinga.com http://www.2.com/
Redirect 301 http://www.redirectingb.com http://www.3.com/
Redirect 301 / http://www.1.com/

The first 2 lines seem incorrect because they don't work.

There are no physical directories for the parked domains, just DNS.

Thanks again!

#236 Ron Carnell

Ron Carnell

    HR 6

  • Moderator
  • 966 posts
  • Location:Michigan USA

Posted 30 November 2005 - 11:27 PM

If you're using httpd.conf for the redirects, go back to the first page of this thread and look at this post. You just need to wrap your redirects inside a VirtualHost block and you should be good to go.

#237 ThreeD

ThreeD

    HR 2

  • Members
  • PipPip
  • 16 posts
  • Location:Online

Posted 01 December 2005 - 02:26 PM

QUOTE(Randy @ Dec 1 2005, 02:21 AM)
Just to make sure we're talking about the same thing since different  people use different terminology...

1. You've got all of your content on domain1.com.
2. domain2.com is parked on top of domain1.com, so when someone goes to domain2.com they see the content from domain1.com but the address bar in their browser still says domain2.com.
3. The same thing goes with domain3.com, domain4.com, etc.

Is this correct?


that is correct Randy smile.gif so in addition to what I've done so far, you want me to add the code you posted above in the root .htaccess file ?

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


this may sound like a stupid question - but what exactly do you mean when you say "negative match" ? smile.gif

thanks again for your help, appreciate it greatly!

#238 Randy

Randy

    Convert Me!

  • Moderator
  • 17,540 posts

Posted 01 December 2005 - 02:48 PM

Negative Match... hmm... How to explain.

A positive match for a normal www/non-www issue would look like:

RewriteCond %{HTTP_HOST} ^maindomain\.com [NC]

This would say if the request start with (^) maindomain.com, meaning no www in in there, it would be True, which would cause the RewriteRule to kick in.

A negative match like:

RewriteCond %{HTTP_HOST} !^www\.maindomain\.com [NC]

says if the request does NOT (!) start with (^) www.maindomain.com, meaning anything other than the www.maindomain.com returns True, which would cause the RewriteRule to kick in. Thus the above negative match will cover not only www/non-www issues but also parked or aliased domains.

Just a different approach.

Did that make sense? (I've never figured out how to put Regex into English, obviously. lol.gif)

#239 ThreeD

ThreeD

    HR 2

  • Members
  • PipPip
  • 16 posts
  • Location:Online

Posted 01 December 2005 - 03:21 PM

hehe thanks Randy wink.gif Yeah that made sense.. the question is, do you want me to add the code you posted above in my root .htaccess file for the redirects to kick in completely?

#240 Randy

Randy

    Convert Me!

  • Moderator
  • 17,540 posts

Posted 01 December 2005 - 05:08 PM

That's where it would need to be. wink.gif




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

SPAM FREE FORUM!
 
If you are just registering to spam,
don't bother. You will be wasting your
time as your spam will never see the
light of day!