Bompa

Are JS redirects 301 or 302?

Can I stipulate which I want?

I have searched and searched this question all over the

net

  and found nothing.

I had thought that if not "declared" somehow, that

apache

  has 301 permenent
as it's default.  That would not be good for what I am doing.

I want to redirect visitors of siteA.com/pageA.html to siteB.com/pageB.html
but I do not want the SEs to drop siteA.com/pageA.html from their indexes.

I do not have access to .htaccess.


So, does anyone know if a typical location.href = "http://www.othersite"; will
be considered a temporary or permenent redirect?

And, regarding the 301 or 302, does the placement of the location.href, in HEAD area,
between HEAD and BODY, or in BODY, have any affect?


Seems like such a basic question.

Bompa

perkiset

I have to scoot out so can answer this more thoroughly in a bit... but the essential answer is that a 301 or 302 is a <i>server</i> response not a client - a JS bounce is a client action therefore, it is neither.

nutballs

Applause

in addition, a JS redirect can also be a non-redirect... meaning, you could turn off JS in your browser and you won't get redirected.

the search engines dont care about it. They will follow it though, but not like you are hoping. If you want users sent on to a different site, but engines to stay on the original, JS will work, but...

Google reads JS and follows it, as I am sure other engines are starting to as well. So the problem is actually more a matter of how to prevent the engine from figuring out where you are sending your traffic after everything is done.

the only real way is cloaking, serverside, because as Perk and I have talked about in the past, If a browser can parse a JS and figure out where to redirect you to, google can too. No matter how much you obfuscate the code, google can read it. bummer huh... Some would argue that you can, i can prove that you can't, and JasonD i think will back me up on that as well.

If you are able to add any type of server side code to the landing page, your golden because then you can cloak/doorway.

The only client side option might be a flash redirect, which then you can load up google's IPs into, and not redirect for those, because frankly at this point, I think google sees everything now, including into flash movies. Though they may not do anything with it, they could. I don't know how to do a flash redirect, but Im sure its simple enough.

hope that helps

perkiset

Applause

quote author=nutballs link=topic=557.msg3652#msg3652 date=1192201800

the only real way is cloaking, serverside, because as Perk and I have talked about in the past, If a browser can parse a JS and figure out where to redirect you to, google can too. No matter how much you obfuscate the code, google can read it. bummer huh... Some would argue that you can, i can prove that you can't, and JasonD i think will back me up on that as well.

Spot on, regardless of n00b coders that will tell you otherwise.
Obsfucation only really applies to trying to fool spamhunters, not the engines.

Bompa

hmmmm, well my concern is that the SE would drop my initial page and add the destination page.
I dont want my page dropped.

anyways, thank you.

perkiset

PM me if you're thinking of a JS effect that you'd like less than public and you nn assistance.


Perkiset's Place Home   Politics @ Perkiset's