Welcome to WebmasterWorld Guest from 107.21.175.178

Message Too Old, No Replies

Avoid meta-refresh and JS redirects - Google's JohnMu

     

tedster

2:45 pm on Jun 28, 2010 (gmt 0)

WebmasterWorld Senior Member tedster is a WebmasterWorld Top Contributor of All Time 10+ Year Member



Last Friday, Google's John Mueller (JohnMu) posted a strong warning in Google's Webmaster support forums:

I would strongly recommend not using meta refresh-type or JavaScript redirects like that if you have changed your URLs. Instead of using those kinds of redirects, try to have your server do a normal 301 redirect. Search engines might recognize the JavaScript or meta refresh-type redirects, but that's not something I would count on -- a clear 301 redirect is always much better.

[google.com...]

piatkow

2:58 pm on Jun 28, 2010 (gmt 0)

WebmasterWorld Senior Member piatkow is a WebmasterWorld Top Contributor of All Time 5+ Year Member



I was under the impression that JS and meta refresh redirects were regarded as black hat cloaking techniques anyway.

freejung

3:18 pm on Jun 28, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I've seen Google handle fairly simple, non-malicious JS redirects in a reasonable manner, at least for the content of a single page, but I certainly wouldn't recommend counting on it.

FranticFish

4:34 pm on Jun 28, 2010 (gmt 0)

WebmasterWorld Senior Member 5+ Year Member



I tested a month ago and here's what I saw:

An instant (0 seconds) meta refresh worked like a 302 redirect; a 5 second delay worked like a 301 redirect.

Robert Charlton

7:38 pm on Jun 28, 2010 (gmt 0)

WebmasterWorld Administrator robert_charlton is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



It's important to note the context of that Google webmaster support discussion. The poster in the Google discussion had just rebuilt a company website, going from all HTML to mostly Cold Fusion (.cfm) pages, and, with the exception of a few framed pages where he was using javascript, was apparently redirecting each old HTML page to a new .cfm page using meta refresh... keeping the old HTML pages in place so the meta refresh redirects could be read. Clearly a flawed strategy, if not a horror story.

We've had several discussions here regarding the use of meta refresh when 301s were not possible because there was no access to the .htaccess file. I don't know for sure what John Mu's answer would be in these cases... and there's no doubt that proper 301s would be better... but I suspect he'd view the problem from a slightly different angle.

See these earlier threads...

301 Redirect with regards to passing PR
http://www.webmasterworld.com/google/3455957.htm [webmasterworld.com]

Using Meta Refresh for redirect - when 301 is not possible
http://www.webmasterworld.com/google/3514320.htm [webmasterworld.com]

There still has been, as far as I know, no official confirmation from Google about how they do treat meta refresh in such situations.

phranque

8:59 am on Jun 29, 2010 (gmt 0)

WebmasterWorld Administrator phranque is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



An instant (0 seconds) meta refresh worked like a 302 redirect; a 5 second delay worked like a 301 redirect.


are you sure?
everything i have read says the 0 delay is treated as a 301.

FranticFish

10:55 am on Jun 29, 2010 (gmt 0)

WebmasterWorld Senior Member 5+ Year Member



That's what I've always read too, but that's not what I saw.

Page A, 0 seconds meta refresh to Page B.
Page B's content indexed under Page A's url. Page A content not indexed, Page B url not indexed.

Page C, 5 seconds meta refresh to Page D.
Page C content/url not indexed. Page D content and url indexed.

gpmgroup

11:24 am on Jun 29, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Slightly O/T - It's worth remembering different engines handle different redirects in different ways.

mirrornl

11:49 am on Jun 29, 2010 (gmt 0)

5+ Year Member



After 2 years of reflecting i finally moved pages from a free server to another server, using a 0 second meta refresh
(the free server didn't allow access to .htaccess nor was php funtional)

It worked perfect for me, like a 301.
The new pages ranked the same immediatly

I have to add that i even could not use webmastertools to indicate a change of adress

[edited by: tedster at 1:37 am (utc) on Jun 30, 2010]

tedster

1:45 am on Jun 30, 2010 (gmt 0)

WebmasterWorld Senior Member tedster is a WebmasterWorld Top Contributor of All Time 10+ Year Member



I had a similar experience several years ago, using a 0 meta-refresh for a friend's site when they needed to move it and had no technical way to create the 301 redirect. And it worked in their case, too.

Nevertheless, it is definitely something to avoid - because as JohnMu mentioned - we can't count on it.

g1smd

8:00 am on Jul 4, 2010 (gmt 0)

WebmasterWorld Senior Member g1smd is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



When I needed to move a site from a free host to proper hosting, I changed all "internal" navigation links on the old site to point to the pages of the new site.

That is, page 1 on the old site no longer linked to page 2, 3, 4 on the old site, but instead linked to page 2, 3, 4 on the new site.

Likewise page 2 on the old site no longer linked to page 1, 3, 4 on the old site, but instead linked to page 1, 3, 4 on the new site.

The change was picked up very quickly, and the new site was indexed and ranking within days. Once the new site was getting traffic, the text content was removed from the old site, just leaving the navigation in place (still pointing at the new site).

That navigation remained in place for another few years until the free host closed down.

We've had several discussions here regarding the use of meta refresh when 301s were not possible because there was no access to the .htaccess file.

If the site uses PHP, there are still plenty of things you can do using the
HEADER
directive. You need two lines of code; one to specify the 301 response, the other for the redirected URL. The URL part must include both the protocol and domain name. For root and for folders do NOT include the index file filename in the URL.

JAB Creations

2:31 am on Jul 5, 2010 (gmt 0)

WebmasterWorld Senior Member jab_creations is a WebmasterWorld Top Contributor of All Time 10+ Year Member



Using a meta element or JavaScript to redirect is akin to using tables for page layouts; it simply shows a lack of understanding of the roles of each respective technology is. That's okay, I think most of us have done something along those lines at some point in the past.

301's should be handled by Apache's htaccess or whatever ColdFusion and IIS use in example. I only use a meta redirect on my redirect page which is naturally not allowed to be crawled or indexed.

I think the string (for lack of a better word right now in my mind) "301" should be added to the thread's title for a short though very important clarification. Initially I honestly was thinking this thread was going to cover redirect pages specifically.

- John

kaled

7:36 am on Jul 5, 2010 (gmt 0)

WebmasterWorld Senior Member kaled is a WebmasterWorld Top Contributor of All Time 10+ Year Member



A while back, I hijacked one of my own pages with a javascript redirect with a resulting fall in SERPS of about 100 places. After removal, it took about 3 months to clear but didn't ever fully recover (but that may be due to other factors).

Am I certain as to the cause of this fluctuation? Only about 95% so doubtless there will be disbelievers but I would definitely recommend against.
In my case, the redirect was located in an onclick event. I noticed that the page with the redirect on appeared above the destination page in SERPS for no valid reason.

Kaled.

Lynque

1:07 pm on Jul 5, 2010 (gmt 0)

10+ Year Member



I agree with G1smd, even when there is no access to the core server files such as httpd.ini or .htaccess having the 2 lines of server side code in place telling the server:
A. what type of redirect it is 301/302
B. where the new page can be found - /mypage.aspx
Is definately the way to go.

Over the years I've come across many instances where the meta-refresh technique had been used, even the 0 second meta-refresh allows the first page to be rendered before redirecting, thus the first page can be indexed.
Rule of thumb is: (at least for me)
If the bot has to render client-side code before redirecting then it "can" index that page. So use server-side code instead.

httpwebwitch

1:22 pm on Jul 5, 2010 (gmt 0)

WebmasterWorld Administrator httpwebwitch is a WebmasterWorld Top Contributor of All Time 10+ Year Member



An instant (0 seconds) meta refresh worked like a 302 redirect; a 5 second delay worked like a 301 redirect.


what do you mean by "worked like"? Do you mean it exhibited similar behaviour in the client? (replaced self in the browser history, updated bookmarks etc)

Or was this an SEO test that determined GOOG treated it he same way they treat a page delivered with a true 302 header?

* * *

I'm guessing when you don't have access to your .htaccess file, it's equally possible you're stuck in a hosted template situation wrapped in a CMS and can't take control with PHP. In those cases you'd have no choice to use a <meta> or JavaScript instead of a <? header() ?>.

FranticFish

3:29 pm on Jul 5, 2010 (gmt 0)

WebmasterWorld Senior Member 5+ Year Member



Or was this an SEO test that determined GOOG treated it he same way they treat a page delivered with a true 302 header?


It was, I set up the test because quite a lot of the bigger hosts in the UK have always used either meta-refresh or a 100% frameset as their two redirect options for parked domains.

This was a few months back now, I'll set it up again.

httpwebwitch

8:28 pm on Jul 5, 2010 (gmt 0)

WebmasterWorld Administrator httpwebwitch is a WebmasterWorld Top Contributor of All Time 10+ Year Member




Page A, 0 seconds meta refresh to Page B.
Page B's content indexed under Page A's url. Page A content not indexed, Page B url not indexed.

Page C, 5 seconds meta refresh to Page D.
Page C content/url not indexed. Page D content and url indexed.


That feels backward to me. Oh well. That's probably one reason GOOG doesn't suggest people do redirection this way!

It was, I set up the test


Awesome, thanks FFish. And thanks for sharing the results. Too much SEO info is based on conjecture or anecdotal experience, not enough is verified using scientific method. Both are valuable, only the latter is reliable.

Sgt_Kickaxe

12:00 am on Jul 6, 2010 (gmt 0)

WebmasterWorld Senior Member sgt_kickaxe is a WebmasterWorld Top Contributor of All Time 5+ Year Member



I would strongly recommend not using meta refresh-type or JavaScript redirects...


That's nonsense, if it works best for my visitors that's what I'll use and I strongly suggest right back at you google that you fix your end to deal with it. If you penalize me for doing what I think is best for my visitors then it reflects poorly upon you, not me.

tedster

2:14 am on Jul 6, 2010 (gmt 0)

WebmasterWorld Senior Member tedster is a WebmasterWorld Top Contributor of All Time 10+ Year Member



I don't think you'll be penalized, Sarge - but you may not get all the ranking power from Google that would be possible.

TheMadScientist

4:13 am on Jul 6, 2010 (gmt 0)

WebmasterWorld Senior Member themadscientist is a WebmasterWorld Top Contributor of All Time 5+ Year Member Top Contributors Of The Month



That's nonsense, if it works best for my visitors that's what I'll use and I strongly suggest right back at you google that you fix your end to deal with it. If you penalize me for doing what I think is best for my visitors then it reflects poorly upon you, not me.

Penalized or not, I totally agree with the sentiment above...
Al Gore invented the Internet :) not Google, and Google certainly doesn't own it now, even though they seem to think they do.

mirrornl

1:06 pm on Jul 6, 2010 (gmt 0)

5+ Year Member



in my cases:
Page A, 0 seconds meta refresh to Page B.
Page B's title and description indexed under Page A's url.(only to find if you search for the url (page A) within quotes)
Page A content not indexed, Page B is indexed.
If searching for content only page B shows up