views:

43

answers:

3

I have this meta tag to check if JavaScript is enabled:

<meta http-equiv="refresh" content="0;url=http://www.example.com/activate_js.html"&gt;

Is this bad in the eyes of search engines like Google, Bing and Yahoo?

If so, what other "safe" methods are there?

A: 

META tag to check if JavaScript is enabled? Not sure I understand what you mean there...

With regard to the question about META tag redirects, these are bad for search engine optimisation (SEO). The correct way is to send an HTTP 301 Moved Permanently Header, either with Apache configuration or perhaps PHP.

chigley
You are kinda assuming he is using PHP/Linux, no? But the gist of your answer is correct - do a 301 redirect server side.
Dan Diplo
Didn't really make any assumptions, just suggested some common methods of doing 301 redirects :)
chigley
A: 

ahh, that meta tag! i know it. it jumps from website to website and drivers webmasters crazy by detecting their javascript! search engines don't like it because it move so fast they cannot index! but it seems like it only comes out in moonshine!

but to answer your question, meta redirects are not followed by most search engines and if they are, (almost) no linkjuice/pagerank is passed on (if that was your question). use 301 redirects for that

Joe Hopfgartner
“because it move so fast they cannot index!” This is really nonsense: a page is simply loaded and it makes no difference for a search engine to read its contents, regardless whether there is a `meta` redirect on the page or not. Cf. the case where you can disable those redirects in your browser.
Marcel Korpel
lol you don't get the first paragraph is all jokes xD
Joe Hopfgartner
Oh wait, yeah, now I see. :D
Marcel Korpel
A: 

Just let Google answer this question:

Google understands the following meta tags (and related items):
[…]
<meta http-equiv="refresh" content="...;url=..." />
This meta tag sends the user to a new URL after a certain amount of time, and is sometimes used as a simple form of redirection. However, it is not supported by all browsers and can be confusing to the user. The W3C recommends that this tag not be used. We recommend using a server-side 301 redirect instead.

Yahoo used to have a message about meta redirects on its pages, but I can't find it anymore. It's quoted in this older article:

META Refresh: <meta http-equiv="refresh" content=…> is recognized as a 301 if it specifies little or no delay or as a 302 if it specifies noticeable delay.

That said, I agree with others that it's best to use a 301 or 302 redirect.

However, this works regardless if JavaScript is enabled or not. To do a redirect using JavaScript, you can issue

window.location = "url-to-navigate-to";

in a script. But notice this really isn't followed by search engines, as they don't interpret JavaScript and just 'read' the page as is.

Marcel Korpel