homepage Welcome to WebmasterWorld Guest from 23.23.12.202
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
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

    
Javascript redirect vs. 404 errors?
sophoclesthesock



 
Msg#: 4396637 posted 3:34 pm on Dec 11, 2011 (gmt 0)

Hi,

I'm working with a client who has a custom CMS that does not currently allow for 301 redirects. There are a number of pages on the site with 404 erros, since they no longer exist, and we can't yet 301-redirect it (although that is in the works for the long term). Is it better to leave the 404's alone, or is it better to implement a javascript redirect, from an SEO perspective? I'm imagining that it's better to leave it for now, since js redirects are considered cloaking, but I'd appreciate any input.

Thanks!

 

tedster

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



 
Msg#: 4396637 posted 4:01 pm on Dec 11, 2011 (gmt 0)

The first thing that comes to mind is that Google's guidelines talk about avoiding SNEAKY JavaScript redirects - they don't give a blanket condemnation to any and all JavaScript redirects. I think if you make everything very straightforward, and especially if you avoid internal links that point to the URL that no longer exists, you should be OK.

You probably have other options, too. For instance, until the CMS is all patched up, you might build the .htaccess file manually so you would have true 301 redirects. Also, you might use a meta-refresh, which is something Google now appreciates that some shared hosting situations make necessary. I've used the meta-refresh with a client site a couple years ago and it worked pretty well.

sophoclesthesock



 
Msg#: 4396637 posted 4:22 pm on Dec 11, 2011 (gmt 0)

Ok, great- thanks for the prompt response!

g1smd

WebmasterWorld Senior Member g1smd us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 4396637 posted 5:37 pm on Dec 11, 2011 (gmt 0)

If you can't add HEADER directives to the CMS scripts, you can build the same redirects in your .htaccess file using Mod_Rewrite RewriteRule directives.

Both methods result in the exact same 301 response being returned to the browser.

mememax

5+ Year Member



 
Msg#: 4396637 posted 11:59 pm on Dec 11, 2011 (gmt 0)

I agree with g1smd, although your CMS doesn't allow 301 redirects (quite strange), I suppose you're considering only php redirects.

There are 3 level where you can act:
  1. htaccess: I doubt your CMS doesn't allow you to insert 301 redirects here, you can modify your htaccess and redirect all 404, with massive rules or one by one
  2. server-side: I suppose this is what you where saying: the CMS doesn't allow you to modify the php to make 301 redirects. It's quite strange you can't modify your 404 php file. Let's see. you write an url--> php checks --> 404 not found. Well you can insert a query just before the 404. Create a table with your lost url, then with php you can check just before giving a 404: "is the uri one of those listed in the table?" if yes you can redirect to another one (the second url in the table), if not then 404
  3. client-side: on this side you can help them in two ways:
    • javascript, as tedster said you don't have to make js redirects because google may think you're making a doorway page or something like that. I don't know if you can make a delayed script like you will be redirected in 5 seconds.
    • proposing them an url. You can give a 404 error and with php propose them the new page. An error like "sorry this page has moved here [link]". Although this "may not" help you in your SEO efforts it may help your users. We always think about the bots but it's important to give to our users an help to avoid them bounce away.


I hope this could have helped in some ways!

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