homepage Welcome to WebmasterWorld Guest from 50.17.162.174
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Subscribe to WebmasterWorld
Home / Forums Index / WebmasterWorld / Webmaster General
Forum Library, Charter, Moderators: phranque & physics

Webmaster General Forum

    
How many 301's is too many?
artefaqs




msg:4154951
 5:35 pm on Jun 18, 2010 (gmt 0)

I've recently started to need a URL shortener service for one of my web sites. I thought about farming it all out to some other company, but realized that the domain I need to shorten URLs for is incredibly short already. So, I'm creating an in-house URL shortener. Here's how it's laid out in theory:

1. .htaccess sees an incoming request for a URL with a page name beginning with "Z" (for example, example.com/Z00101 since nothing I have begins with a capital Z, this seems like an OK flag) and 301's it to /short.php

2. short.php extracts the page code from the forwarded address and looks up the full address in the database.

3. short.php squirts out its own 301 to the final destination.

So what happens is I have two 301's.

example.com/Z00101 >301> short.php >301> example.com/original.long.page.here.php

So my questions are --

Is having TWO 301's a problem? Will the search engines understand that example.com/Z00101 == example.com/original.long.page.here.php, or will they decide that example.com/Z00101 == short.php?

Will this redirecting affect page rankings in any way?

Will this set off suspicious alarms at the search engines?

 

Sgt_Kickaxe




msg:4155049
 9:46 pm on Jun 18, 2010 (gmt 0)

eBay does this all the time and as of the MayDay update is having tremendous success (400% traffic jump vs April according to 3rd party stat collecting sites).

You will lose some PR through redirects and if google isn't sure you are showing the same page to everyone you could be de-indexed. Keep it consistent.

phranque




msg:4155094
 11:48 pm on Jun 18, 2010 (gmt 0)

for what it's worth, everything i have read in google references/resources, MC's blog and other places agree that multiple redirects should be avoided.

site:webmasterworld.com "chained redirects" [google.com]

g1smd




msg:4155098
 12:00 am on Jun 19, 2010 (gmt 0)

That first external redirect should really be an internal rewrite instead.

That is, your RewriteRule should target the internal script filepath, and should not target a URL with domain and protocol.

Use the [L] flag, and do NOT use the [R] flag.

The script will work exactly as it does now, and any request will see only a single 301 redirect. Ensure that requests for Z are not NOT redirected from non-www to www before the rewrite. Exclude the Z path from your canonicalisation rule, because the script will do all the work.

That is, both example.com/Z0001 and www.example.com/Z0001 should access the script and be redirected by the script. There should be no prior non-www/www redirect for *those* requests.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / WebmasterWorld / Webmaster General
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About
© Webmaster World 1996-2014 all rights reserved