Welcome to WebmasterWorld Guest from 54.196.145.173

Forum Moderators: Robert Charlton & aakk9999 & andy langton & goodroi

Message Too Old, No Replies

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

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

Senior Member

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

joined:May 26, 2000
posts:37301
votes: 0


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...]
2:58 pm on June 28, 2010 (gmt 0)

Senior Member from GB 

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

joined:Apr 5, 2006
posts:3337
votes: 25


I was under the impression that JS and meta refresh redirects were regarded as black hat cloaking techniques anyway.
3:18 pm on June 28, 2010 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Nov 28, 2002
posts:757
votes: 0


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.
4:34 pm on June 28, 2010 (gmt 0)

Senior Member from GB 

WebmasterWorld Senior Member 5+ Year Member Top Contributors Of The Month

joined:Sept 16, 2009
posts:1040
votes: 65


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.
7:38 pm on June 28, 2010 (gmt 0)

Moderator This Forum from US 

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

joined:Nov 11, 2000
posts:11584
votes: 240


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.
8:59 am on June 29, 2010 (gmt 0)

Administrator

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

joined:Aug 10, 2004
posts:10563
votes: 16


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.
10:55 am on June 29, 2010 (gmt 0)

Senior Member from GB 

WebmasterWorld Senior Member 5+ Year Member Top Contributors Of The Month

joined:Sept 16, 2009
posts:1040
votes: 65


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.
11:24 am on June 29, 2010 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Apr 21, 2003
posts: 825
votes: 0


Slightly O/T - It's worth remembering different engines handle different redirects in different ways.
11:49 am on June 29, 2010 (gmt 0)

Full Member

10+ Year Member

joined:Feb 1, 2006
posts:256
votes: 0


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]

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

Senior Member

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

joined:May 26, 2000
posts:37301
votes: 0


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.
8:00 am on July 4, 2010 (gmt 0)

Senior Member

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

joined:July 3, 2002
posts:18903
votes: 0


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.
2:31 am on July 5, 2010 (gmt 0)

Senior Member from US 

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

joined:Aug 26, 2004
posts:3159
votes: 15


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
7:36 am on July 5, 2010 (gmt 0)

Senior Member

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

joined:Mar 2, 2003
posts:3710
votes: 0


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.
1:07 pm on July 5, 2010 (gmt 0)

Junior Member

10+ Year Member

joined:Feb 22, 2005
posts:70
votes: 0


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.
1:22 pm on July 5, 2010 (gmt 0)

Moderator from CA 

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

joined:Aug 29, 2003
posts:4059
votes: 0


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() ?>.
3:29 pm on July 5, 2010 (gmt 0)

Senior Member from GB 

WebmasterWorld Senior Member 5+ Year Member Top Contributors Of The Month

joined:Sept 16, 2009
posts:1040
votes: 65


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.
8:28 pm on July 5, 2010 (gmt 0)

Moderator from CA 

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

joined:Aug 29, 2003
posts:4059
votes: 0



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.
12:00 am on July 6, 2010 (gmt 0)

Senior Member

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

joined:Apr 14, 2010
posts:3169
votes: 0


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.
2:14 am on July 6, 2010 (gmt 0)

Senior Member

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

joined:May 26, 2000
posts:37301
votes: 0


I don't think you'll be penalized, Sarge - but you may not get all the ranking power from Google that would be possible.
4:13 am on July 6, 2010 (gmt 0)

Senior Member from US 

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

joined:Apr 14, 2008
posts:2910
votes: 62


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.
1:06 pm on July 6, 2010 (gmt 0)

Full Member

10+ Year Member

joined:Feb 1, 2006
posts:256
votes: 0


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