Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2010-08-11 10:50:17

Destry
Member
From: Haut-Rhin
Registered: 2004-08-04
Posts: 4,909
Website

Redirect question about 303 vs. 301

Hey all,

Soon I’ll be needing to redirect the root of a directory to an external location for 12 months. Traffic will be between the two servers where different content will exist, so the whole thing is a combination of specific URL pointing via DNS and redirecting.

With respect to the redirecting, and considering that the redirection will be removed after the 12 months is over:

  1. Would it be better to use a 303 or is it appropriate to use a 301?
  2. If 303, do you simply substitute “303” in a “301” redirection? (E.g., Redirect 301 http://mine.tld http://date.theirs.tld)

The root redirect will be removed after the predetermined time. The 303 seems to be a satisfactory choice (over 307) for a temporary redirect, whereas 301 indicates permanent.

Does it really matter if a 301 is used?

Appreciate any thoughts on this matter.

Offline

#2 2010-08-11 12:21:40

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: Redirect question about 303 vs. 301

Destry wrote:

Does it really matter if a 301 is used?

According the specs HTTP status code 301 is permanent and is adviced that the redirection location is accessed instead the old one. That means that the redirection will (or might) be cached by the client and/or bot.

It might take long time untill address gets back to the search index, not to mention that some of your visitors might never flush their proxies and browsers.

But on the other hand, even then it’s not exactly permanent. If you tell search engine bot to go to the address (link/sitemap etc), eventually it will go and the user’s cache doesn’t last for eternity.

I would go with temp code.

Last edited by Gocom (2010-08-11 12:25:30)

Offline

#3 2010-08-11 12:24:48

graeme
Plugin Author
Registered: 2004-06-21
Posts: 337
Website

Re: Redirect question about 303 vs. 301

Personally I use 303 when a user submits a form and is redirected to a different URL based on what has been submitted.

I’m not an expert by I doubt using 301 would be too bad. But if I were you I would probably use 302 – I see that as a half way between 301 and 307.

Offline

#4 2010-08-11 22:39:25

Destry
Member
From: Haut-Rhin
Registered: 2004-08-04
Posts: 4,909
Website

Re: Redirect question about 303 vs. 301

Thanks, guys.

So last question, then. Do I just substitute 302 or whatever for 301 in something like this? Redirect 301 http://mine.tld http://date.theirs.tld

I think that’s all there is to it, right? I can’t seem to find an example to confirm that though.

Btw, maybe it would be helpful to have a few more details about the overall mapping objective…

At mine.tld there will be yearly subdirectories like 2010.mine.tld that serve as mini-site archives. The current year’s mini-site will be developed and hosted externally. Through collaborative use of DNS we’ll resolve 2011.mine.tld to their server URI having an alias of 2011.mine.tld. At the same time, _mine.tld (the root) will also be redirected to the same alias location (temporarily for 12 months).

At the end of the 12 months, the redirect will be removed so that mine.tld is true again, and the external mini-site will be archived at the true 2011.mine.tld directory on the same server. Nothing will be resolving or redirecting away. From that point on mine.tld will have it’s own content, never to be redirected away again, though new min-site projects may be (e.g., 2012.mine.tld to wherever.tld).

Offline

Board footer

Powered by FluxBB