Jump to content

Leading Community for Usability, Search Engine Marketing,
Social Networking, Site Planning & Web Site Development, Since 1998


Photo

So confused about 302 redirects


  • Please log in to reply
24 replies to this topic

#1 RisaBB

RisaBB

    Eyes Like Hawk Moderator

  • Moderators
  • 1436 posts

Posted 29 March 2006 - 07:32 PM

Hello,

My client is changing his domain name and he doesn't want to lose his current rankings.

Scottie Claiborne wrote an article, Switching to a New Domain Without Losing Your Google Rankings

She writes:

By using a 302 "temporarily moved" response instead of a 301, the original URL will remain in Google's index, and maintain its position as if the page were still there. However, visitors who click on the link will be brought to your new URL, exactly where you want them to be. It's the best of both worlds -- you retain your rankings during that interim aging period, but visitors are redirected to the updated and correct domain.


Ian McAnerin wrote about a 302 Redirect:

A function of a web server that redirects the visitor from the current page or site to another page or site, while returning a response code that says that the original page or site has been temporarily moved to the new location. Search engines will often interpret these as a park, and take their time figuring out how to handle the setup. Try to avoid a 302 redirect on your site if you can (unless it truly is only a temporary redirect), and never use them as some form of click tracking for your outgoing links, as they can result in a "website hijacking" under some circumstances.


And I'm not sure what to make of Matt Cutt's advice SEO Advice - Discussing 302 Redirects.

It seems that not many people have heard of a 302 redirect. I called up my current hosting company. They never heard of it and told me to call Google and tell them to keep my rankings the same. HAHAHAHAHAHHAHAHAHAHAHAHAHAHAHAHA!!!!!!!!!

I called up the hosting company I'm thinking of switching to. After telling me that they've done it lots of times and can send me info on it, they e-mailed me a link to info on a 301 redirect. I called back and they never heard of a 302 redirect.

If I do a 302 redirect, is this what it looks like but I replace 301 with 302? I got all this code from here.

Redirect in ASP .NET
<script runat="server">
private void Page_Load(object sender, System.EventArgs e)
{
Response.Status = "301 Moved Permanently";
Response.AddHeader("Location","http://www.new-url.com");
}
</script>


So, what's the story?

Please help me understand if this is the way to go.

Thanks.

Risa

Edited by RisaBB, 29 March 2006 - 08:02 PM.


#2 meriweather

meriweather

    Light Speed Member

  • Members
  • 583 posts

Posted 29 March 2006 - 09:27 PM

Hi Risa,

I'm not going to claim that I have the answer to this one, though I do have the solutions that I've found to work for me. Rather than write a book, I think it would be better to direct you to some of the local and other resources that helped me come to my conclusions.

There are problems inherant with a 302 re-direct which outweigh any possible benefit, in my oppinion. By using the 301 there is a delay in the PR being transfered, possibly as much as 2-3 months for all the pages in all the search engines, but by judicious Pay-per-click, and other advertising durring the interum, the loss in traffic can be kept to a minimum and even increased if the campaign is succesful.

This one that sums it all up pretty good, I think, along with the reasoning behind it and various problems/solutions in the aplication.
http://www.cre8asite...ST&f=23&t=29607 Pierre's tutorial on 301's is the start of the thread and the thread has all the basics for different servers and conditions.

If, by chance you don't find everything you need there, this one has a pretty straight forward approach to the problem too. http://www.mcanerin....rect-apache.asp

Hope that helps.

Doc

Oops! I just re-read your post and realized that you are operating in ASP.NET. The second suggestion I gave is for Apache servers and does not apply to your situation. Pierre's post has information on both and lots of links to further reading on the subject. Hope I didn't confuse you further by my oversite.

/doc

Edited by meriweather, 29 March 2006 - 09:33 PM.


#3 RisaBB

RisaBB

    Eyes Like Hawk Moderator

  • Moderators
  • 1436 posts

Posted 29 March 2006 - 09:35 PM

Thanks, Doc. That's not really the answer I wanted to hear. I was hoping that a 302 redirect was definately the way to go. Any more opinions?

Risa

#4 bragadocchio

bragadocchio

    Honored One Who Served Moderator Alumni

  • Hall Of Fame
  • 15634 posts

Posted 29 March 2006 - 09:38 PM

Hi Risa,

Nice answer from Doc while I was writing all of the stuff below. I'll post it anyway. :)

The codes themselves are part of a set of codes know as HTTP status codes. HTTP is "Hypertext Transfer Protocol," which is a way of sending and retrieving information across the web. When a web server receives a request from a browser, or spider, or other program, it receives that request in a specific format, and the format is defined by the Hyper Text Transfer Protocol.

The web server will normally send a response back to that request, and that response is also defined by a number of rules that are described by the Hypertext Transfer Protocol. There's a whole big section of the World Wide Web Consortium (W3C) website that describes how HTTP works, but we really only need to look at part of that.

Part of the response that is sent back to a request includes a status code. The status code helps the browser or spider or other program know what to do with the request. Usually a response will start out with a status, which includes:

The version of HTTP being used on the computer responding
The status code
A short description of the status code.

So, you might see something like this:

HTTP/1.1 200 OK

In that status response, the status code is "200" which means OK, I'll send you what you are requesting. Another one that you might have heard of, and have seen is "404" which means "not found."

The W3C has definitions for the HTTP status codes that might be helpful in understanding how they work, and why search engines might react to them the way that they do.

The definition for a 301 http status code:

301 Moved Permanently

The requested resource has been assigned a new permanent URI and any future references to this resource SHOULD use one of the returned URIs. Clients with link editing capabilities ought to automatically re-link references to the Request-URI to one or more of the new references returned by the server, where possible. This response is cacheable unless indicated otherwise.

The new permanent URI SHOULD be given by the Location field in the response. Unless the request method was HEAD, the entity of the response SHOULD contain a short hypertext note with a hyperlink to the new URI(s).

If the 301 status code is received in response to a request other than GET or HEAD, the user agent MUST NOT automatically redirect the request unless it can be confirmed by the user, since this might change the conditions under which the request was issued.



The definition for a 302 http status code:

302 Found

The requested resource resides temporarily under a different URI. Since the redirection might be altered on occasion, the client SHOULD continue to use the Request-URI for future requests. This response is only cacheable if indicated by a Cache-Control or Expires header field.

The temporary URI SHOULD be given by the Location field in the response. Unless the request method was HEAD, the entity of the response SHOULD contain a short hypertext note with a hyperlink to the new URI(s).

If the 302 status code is received in response to a request other than GET or HEAD, the user agent MUST NOT automatically redirect the request unless it can be confirmed by the user, since this might change the conditions under which the request was issued.


So, a 301 status code says, "hey, the page that you were looking for is no longer here, you should go over there at this new address to get it from now on."

A 302 status code says, "The page isnt' here, but is going to be over at this other address for a little while. That may not be the permanent new home for it, so keep checking back here."

Both Scottie and Ian are right, in what they say. Scottie is writing about maintaining the rankings for the old address, and the search engine should keep the old address in its index as the address of record for the page, since the new address is only temporary, and could change right back, or move to somewhere else.

Ian notes that if you want the search engine to try to move the pagerank/link popularity to the new address, that you should use a 301 redirect. Where he talks about avoiding using a temporary redirect in the beginning of the quote, he is talking about a 302 redirect, and states that the use of that type of redirect can confuse a spider and slow down a search engine in moving a value to the new address.

Redirects can be within a site, though I prefer if people make changes to the links themselves if they can. It's sort of like a bandaid instead of a solution.

If you change to a new domain, you can set redirects for pages of the old domain to point to pages on the new domain. If you use a 301 redirect, the search engine will start looking at the new address when it sees the old address, and should carry over any pagerank to the new address. If you use a 302 redirect, it will think that this is only temporary, and will keep the pagerank at the old address, even though people will get to the new page.

Matt describes the way that Google responds to temporary redirects in his post. It keeps the old URL, but indexes the content on the new URL being pointed towards:

Okay, back to our regular discussion. Now let’s talk about off-domain 302 redirects. By definition, those are redirects from one domain A.com to another domain B.com that are claimed to be temporary; that is, the web server on A.com could always change its mind and start showing content on A.com again. The vast majority of the time that a search engine receives an off-domain 302 redirect, the right thing to do is to crawl/index/return the destination page (in the example we mentioned, it would be B.com).


Note that he then writes that this is what happens most of the time. Sometimes it doesn't. In rare events, they make exceptions, and sometimes that may result in the hijacking of a domain.


Ideally, if you want to move to a new domain, and you want to give yourself time to gain some new links, and want to try to have old links repointed to the new address, you hold on to the old domain and server for a while, and use 301 redirects to point to the new pages on the new domain.

Depending upon the software used on the server you are using to redirect the http requests for one page, to another, there are a few ways make that redirect happen. Under Apache 1.3, there's one method, which is detailed here: http://httpd.apache....s.html#redirect

One of the important statements on that page is this one:

If no status argument is given, the redirect will be "temporary" (HTTP status 302). This indicates to the client that the resource has moved temporarily.


So, it's possible to do a redirect without stating that it is a 301 or a 302 redirect, and if you don't it will be a 302 (temporary) redirect by default. The same is true under Apache 2.0.

On a windows server, using IIS, it's possible to set a redirect for each page. It's important when doing that to check off that it is a permanent redirect. There's also a few programs that will imitate the redirect, like Isapi Rewrite.

I haven't worked with asp to do a rewrite, but I hope the above helps you a little.

#5 meriweather

meriweather

    Light Speed Member

  • Members
  • 583 posts

Posted 29 March 2006 - 09:39 PM

LOL - Afraid I can't help you with that one then Risa, but hopefuly someone can. :)

cheers,

Doc

#6 Gilad.G

Gilad.G

    Ready To Fly Member

  • Members
  • 21 posts

Posted 29 March 2006 - 10:01 PM

From my experience there is no easy way for switching domain names. As more and more weight is given to the domain's authority and it's age, it may take a while to re-build such authority (given that the age is the same).

I see that Scottie's article has been written in 2003 and back then redirects did work in such situations.

meriweather was right about the 301 redirect, it is a permanent redirect and is what you're performing. Within a short period of time, search engines sholc credit all backlinks to the new domain.

Lastly, if you want to keep the old site indexed and show the new site, you can use domain cloaking where you can direct GoogleBot to the old site and humans to the new site and have 2 copies of the site, one on each domain. I know cloaking is a bad word, but according to Google's Guidelines (http://www.google.co...guidelines.html) it is bad only when deceiving users and feeding different content whereas you're not.

(Note to Moderator: I am rather new to the forum and am not sure if the above advice is an acceptable content for posting, if it is not, feel free to remove it...)

#7 bragadocchio

bragadocchio

    Honored One Who Served Moderator Alumni

  • Hall Of Fame
  • 15634 posts

Posted 29 March 2006 - 11:42 PM

Hi Gilad,

It's a good point, and worth talking about and discussing.

Google's guidelines don't really define cloaking when they say:

Make pages for users, not for search engines. Don't deceive your users or present different content to search engines than you display to users, which is commonly referred to as "cloaking."



There's a mention of intent in the first sentence, but it's really impossible to tell if the second line imports the intent of the first. Regardless, to Google, spam is what they say it is. And so is cloaking.

Let's assume that they are fine with it because the content on both sites is exactly the same.

At some point, I could see someone linking to the new site, and googlebot would follow that link. Unless the robot was disallowed by robots.txt, the search engine could possibly consider the sites to be mirrors of each other because they share both content and link structure. It might then decide to stop indexing one or the other of the sites, deciding which one on its own.

Even if that didn't happen, any new links gained from people linking to the pages would be to the new site, and not the old one. So future pagerank earned would not be added to the old pagerank.

That might be the result of doing that. So it might not help.

#8 Ron Carnell

Ron Carnell

    Honored One Who Served Moderator Alumni

  • Hall Of Fame
  • 2054 posts

Posted 30 March 2006 - 01:36 AM

It's important, I think, to read Ian's warning very closely.

Try to avoid a 302 redirect on your site if you can (unless it truly is only a temporary redirect), and never use them as some form of click tracking for your outgoing links ...


There's absolutely nothing wrong with using a 302 when it really is a redirect. The problem is a lot of people use them simply to get from page A to page C by taking a slight detour through page B. Indeed, if you look at any of the links posted in this thread, including yours, you'll discover they are actually going to a program on this domain called jump.php. We're not doing that for click tracking, as Ian mentioned, but rather to protect ourselves from inadvertently linking to bad neighborhoods. Guess how a click gets from jump.php to the final destination? Yep, with a 302. The forums happen to exclude jump.php in robots.txt, so there's no danger of a robot following the 302 and getting confused, but there are a TON of directories and such out there routinely sending people off to other sites by issuing a 302 redirect. As Ian pointed out, that is NOT the purpose of a 302 and should be avoided.

Yea, you could use a 301 as some have suggested. It will transfer link credits from one domain to the other, usually within a few months, sometimes in just a few weeks. The problem with using a 301 in your situation, Risa, is transferring link credit probably isn't going to be enough. Whether people call it a sandbox, an aging delay, or Googlebot's rendition of digital menopause, new domains often go through a period of time where they can't rank for diddly in Google, no matter content or link credit. The link credit transferred by a 301 often won't do any good on a brand new domain for at least nine months to a year.

Scottie's idea of using a 302 redirect tries to side-step the new domain issue by continuing to use the old domain. All of your old pages, in theory, will continue to rank in Google just as they do now. But when someone clicks on the link in a SERP, they will be redirected to your new domain. The sandbox/aging delay/menopause will still be applied to the new domain, but you really don't have to care. At some point, when the new domain is no-longer-quite-so-new, you change the 302 and to 301 and let the no-longer-quite-so-new domain replace the now very old domain in the SERPs.

I honestly don't know if that will work or not.

The quotation from Matt Cuts that Bill posted is a direct result of people misusing 302 redirects in the way Ian warned against. Used as jump script, a 302 can result in a page actually be hijacked. To avoid that, Google has started treating off-site 302 redirects as essentially being 301 redirects in most cases. If that happens in your case, your brand new domain will soon show up in the SERPS instead of your old domain -- and rank very, very poorly for nine to twelve months.

My best advice, frankly, is DON'T CHANGE DOMAINS right now. Unless someone is taking you to court and preventing you from keeping the old domain, the cost for changing is going to be very, very high. Sooner or later, be that six months from now or two years down the road, search engine technology is going to catch up to need and recognize that not all new domains are in fact new. Sooner or later, there will be an accepted manner for doing exactly what you want to do. My advice is to wait for it if at all possible.

If you absolutely have to move from an old domain to a brand new one right now, my next best advice is to go ahead and use the 302 redirect.

It won't hurt you, and it just might help. The ASP code you referenced should work, by changing the status code as you guessed, but doing it at the server level (with individual redirects set through the control panel, or better yet, with 3rd party ISAPI filters) will be more efficient. Use the 302 redirect and then keep an eye on the SERPs. If the old domain stays in the index, you're good to go and have escaped the sandbox/aging delay/etc. Start building some links to the new domain and, a year or so down the road, switch the 302 to a 301 to reclaim any lingering link credits. On the other hand, if the old domain drops out of the index and is replaced with the new domain, you'll know your 302 is being treated as a 301 and there's a chance you're going to be hosed for most of the next year. You might as well change it to a real 301 if that happens, though it may not matter much for several very long months.

I hope that helps explain the confusion (rather than just adding to it?). :)

#9 RisaBB

RisaBB

    Eyes Like Hawk Moderator

  • Moderators
  • 1436 posts

Posted 30 March 2006 - 02:50 AM

Oh my goodness, Bill, Ron and everybody! That was really really nice of you to write such long detailed posts. I'm up too late and my head is spinning.

This is making me feel that whatever I do, I should let my attorney client know that this move is risky.
I'm going to have to read this post all again.

Thanks so much for your time!

Risa

#10 RisaBB

RisaBB

    Eyes Like Hawk Moderator

  • Moderators
  • 1436 posts

Posted 30 March 2006 - 03:12 AM

Does this make a difference?- we'll be keeping the old domain name. So does that mean that a 301 redirect would be OK because even though the old site will show up in Google, when you click on the old link, it will redirect you to the new URL, but does this prohibit the new one from getting ranked on it's own.

I still have to re-read the above posts.

Risa

#11 joedolson

joedolson

    Eyes Like Hawk Moderator

  • Technical Administrators
  • 2870 posts
  • Twitter:http://twitter.com/joedolson
  • Facebook:http://facebook.com/joedolson

Posted 30 March 2006 - 04:23 AM

If you're simply changing hosts without actually changing domain names, then you don't need to do anything for the re-direct - I recommend reading this thread on moving hosts for everything you need to know.

Changing a host will cause the DNS servers to have to repropagate the location of your server, which will take around 3 or 4 days - all PageRank is associated with the domain name, not the server, so there should be a minimal disruption during this period.

-Joe

[edit]
Just re-read your post, and my impression is that you're keeping BOTH domain names? If so, my post above may be irrelevant :)
[/edit]

Edited by joedolson, 30 March 2006 - 04:27 AM.


#12 RisaBB

RisaBB

    Eyes Like Hawk Moderator

  • Moderators
  • 1436 posts

Posted 30 March 2006 - 07:59 AM

Hi Joe,

I read the post you referred to prior to writing this one.

I'm going to somehow re-direct the old to the new, so if the old one shows up in the rankings, the link will show the old domain but redirect to the new one.

Risa

#13 Ron Carnell

Ron Carnell

    Honored One Who Served Moderator Alumni

  • Hall Of Fame
  • 2054 posts

Posted 30 March 2006 - 08:57 AM

Does this make a difference?- we'll be keeping the old domain name. So does that mean that a 301 redirect would be OK because even though the old site will show up in Google ...

The old domain won't show up in Google, Risa. It will be completely gone. The 301 redirect specifically tells the engine to drop the old and start using the new. It won't be instant, but within a few months the old domain will be but a memory. Your problem is that, while the new domain will indeed replace the old domain in the index, the aging delay will likely prevent it from ranking for anything even remotely competitive. Your client is essentially throwing away all his history and starting from scratch.

It's almost as if he moved his offices across country and opened a law practice in a new city. He really can't expect to take all his old clients with him, nor can he expect to find a lot of new clients waiting with bated breath. In my opinion, there's no way to affect such a move without paying a price for it.

#14 joedolson

joedolson

    Eyes Like Hawk Moderator

  • Technical Administrators
  • 2870 posts
  • Twitter:http://twitter.com/joedolson
  • Facebook:http://facebook.com/joedolson

Posted 30 March 2006 - 09:39 AM

In my opinion, there's no way to affect such a move without paying a price for it.


I think that's the crux of the matter - if the new domain name is really a worthwhile change, that is, the new domain name is decisively superior to the previous, then it's probably worth while. Only you and your client can really decide whether it's worthwhile to make this kind of a step.

Unless you're in a situation where it's a legal necessity to change domain names (trademark infringement, partner left the firm, new partner joined the firm, etc.) it is definitely worthwhile to sit down and have a long discussion with your client concerning the advantages and disadvantages of making the change.

Like Ron said, there's simply no way to make such a major change without going through an extensive period of rebuilding.

The fact that you still own the old domain simply means that visitors with old bookmarks will be able to visit the old site and be automatically moved on - as far as a search engine is concerned, however, once it sees the 301 response, that's the end for that domain.

#15 EGOL

EGOL

    Eyes Like Hawk Moderator

  • Moderators
  • 4600 posts

Posted 30 March 2006 - 09:42 AM

Ron is right!

I have a new domain, very recently indexed, a trademarked name, and I am salivating to use it. I'd love to redirect my best site to this domain but will not do that because it will most likely be sandboxed. If you are currently making money from the site to be redirected and some of the income is from search engine traffic - specifically google traffic, think carefully if you want to risk that income stream.

Edited by EGOL, 30 March 2006 - 09:43 AM.


#16 RisaBB

RisaBB

    Eyes Like Hawk Moderator

  • Moderators
  • 1436 posts

Posted 30 March 2006 - 10:02 PM

Thanks, guys.

So most people are saying that a 302 redirect is not the clincher that keeps old rankings with a new domain name.

I can see why my client wants to change his domain name. When he first started using it, he mainly practiced one field of law, which is in his domain name, but now he practices more fields of law and doesn't want the perception that he just does that area. He wants to change it from nameabclaw.com to namelaw.us.

I've sent most of these opinions to my client, so whatever he decides, he'll be well aware of the risks involved.

Thanks again.

Risa

Edited by RisaBB, 30 March 2006 - 10:16 PM.


#17 AbleReach

AbleReach

    Peacekeeper Administrator

  • Admin - Top Level
  • 6370 posts

Posted 30 March 2006 - 11:01 PM

Ahhhh, OK.

You could look at if with minor tweaks nameABClaw.com could be a site about the specialized area of ABC law, offering additional insight about ABC for visitors to namelaw.com.

Edited by AbleReach, 30 March 2006 - 11:01 PM.


#18 RisaBB

RisaBB

    Eyes Like Hawk Moderator

  • Moderators
  • 1436 posts

Posted 31 March 2006 - 08:14 AM

AbleReach,

Would you clarify because I'm not sure I totally understand what you are saying.

Are you saying to have 2 domains, one for nameABClaw.com (the current one) and keep everything related to ABC under that domain, and namelaw.us will cover everything else?

He currently has high rankings for ABC, DEF, GHI, JKL.

But to avoid duplicate content, I'll have to get rid of DEF, GHI, JKL, so even if I keep ABC content on nameABClaw.com, I will lose the rankings for the rest, right?

Although, maybe you really are onto something because I'm having alot of content re-written, so I guess the content really won't be duplicate.

But on the other hand, newly optimized content on site 1 will be picked up quickly, but not on site 2.

Thanks so much. I think you're onto something once it's crystalized to me.

Have a great weekend.

Risa

Edited by RisaBB, 31 March 2006 - 09:00 AM.


#19 RisaBB

RisaBB

    Eyes Like Hawk Moderator

  • Moderators
  • 1436 posts

Posted 06 July 2006 - 09:12 AM

Hi Bill,

Way back in March, you wrote:

If you change to a new domain, you can set redirects for pages of the old domain to point to pages on the new domain. If you use a 301 redirect, the search engine will start looking at the new address when it sees the old address, and should carry over any pagerank to the new address. If you use a 302 redirect, it will think that this is only temporary, and will keep the pagerank at the old address, even though people will get to the new page.

I thought this issue died with my client, but it didn't. I have to pick my battles with the client and I'm not sure if I should fight this one passionately.

Are you saying that I can change domain names, do a 301 redirect, and all should be well? What about pages at the new domain that are new, so they never existed on the old site to even do a redirect?

Thanks!

Risa

#20 bragadocchio

bragadocchio

    Honored One Who Served Moderator Alumni

  • Hall Of Fame
  • 15634 posts

Posted 06 July 2006 - 10:12 AM

This is a little like moving an actual physical office.

When you make the move, you have to notify the post office that you have a new address, contact vendors, magazines that you subscribe to, and a whole host of others, possibly including clients. There's a bundle of confusion around the whole process.

Where that analogy breaks down is when it comes to the search engines. Since you still have control over the old domain name, and can use a redirect, you are in effect putting a sign on the front door telling visitors that you have a new address. A 302 redirect is a little like a sign that says - "hey, you can get in touch with us over at this new address for now, we might be back here, and we might not." A 301 redirect is more like a sign that says, "We've moved our office, and we won't be back at this address."

It's quite possible that Google will transfer over link popularity from the old address to the new address with a 301 redirect, but other factors come into play. What Ron wrote about above, and what Scottie's article have discussed is what is seen as a delay in rankings for new sites. They've recommended using a 302 redirect for now, so that link popularity remains with the old site, but visitors appear on the new site.

In the mean time, work on getting new links to the new site, and then 6 months to a year down the line, when the new site starts appearing in the rankings, change the 302 redirect on the old site to a 301 redirect.

As for new pages on the new site, they will likely receive some pagerank from internal links within the new site, and maybe even from links outside of the site if people link to them. But, it may be a while before they gain the benefit of internal linking regardless of which approach you take - using a 301 or a 302.

Either way, it would be really helpful for an effort to take place to try to point some new links to the new domain, if you are going to use one.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users