homepage Welcome to WebmasterWorld Guest from 54.226.0.225
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Visit PubCon.com
Home / Forums Index / Google / Google SEO News and Discussion
Forum Library, Charter, Moderators: Robert Charlton & aakk9999 & brotherhood of lan & goodroi

Google SEO News and Discussion Forum

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




msg:4160710
 2:45 pm on Jun 28, 2010 (gmt 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...]

 

piatkow




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

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

freejung




msg:4160725
 3:18 pm on Jun 28, 2010 (gmt 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.

FranticFish




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

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




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

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




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

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




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

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




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

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

mirrornl




msg:4161221
 11:49 am on Jun 29, 2010 (gmt 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]

tedster




msg:4161788
 1:45 am on Jun 30, 2010 (gmt 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.

g1smd




msg:4164236
 8:00 am on Jul 4, 2010 (gmt 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.
JAB Creations




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

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




msg:4164576
 7:36 am on Jul 5, 2010 (gmt 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.

Lynque




msg:4164710
 1:07 pm on Jul 5, 2010 (gmt 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.

httpwebwitch




msg:4164741
 1:22 pm on Jul 5, 2010 (gmt 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() ?>.

FranticFish




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

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




msg:4164927
 8:28 pm on Jul 5, 2010 (gmt 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.

Sgt_Kickaxe




msg:4164994
 12:00 am on Jul 6, 2010 (gmt 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.

tedster




msg:4165016
 2:14 am on Jul 6, 2010 (gmt 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.

TheMadScientist




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

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




msg:4165185
 1:06 pm on Jul 6, 2010 (gmt 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

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Google / Google SEO News and Discussion
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved