Forum Moderators: phranque

Message Too Old, No Replies

how many redirects are you allowed in .htaccess

         

fzx5v0

4:20 pm on Jun 17, 2008 (gmt 0)

10+ Year Member



Hi

i am creating a new site and would like toredirect about 400 product to there new urls

how many 301 redirects are you allowed in the .htaccess

thanks

jdMorgan

5:04 pm on Jun 17, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



There is no limit, but you should carefully analyze your URLs to determine if you can take advantage of the pattern-matching capabilities of RedirectMatch in mod_alias, or RewriteCond and RewriteRule in mod_rewrite.

Also, since you are changing your URLs, I'd suggest that you consider going to extension-less URLs now, and design your new URL structure very carefully, so that you never have to change your URLs again -- ever.

In addition to staying within the spirit of the Web [w3.org] as defined by its inventor, this will prevent your having to go through the 30-day-to-one-year ranking 'penalty' associated with the loss of your TrustRank from changing so many URLs. (I quoted 'penalty' because it is not a penalty, just the result of losing your TrustRank.)

Jim

fzx5v0

5:45 pm on Jun 17, 2008 (gmt 0)

10+ Year Member



Thanks for the reply

we are going to have to do it by hand as there is no pattern match. The new urls are extension less but some are a bit long though but I presume that doesnot matter

The domain name is not changing just the pages will I still get the ranking penalty?

thanks

fzx5v0

5:47 pm on Jun 17, 2008 (gmt 0)

10+ Year Member



http://example.com/Inkjet-Cartridges/Epson/Epson-Stylus-800/Epson-Original-Black-Printer-Cartridge-S020039-Twin-Pack+47/

this is what i mean about long

[edited by: jdMorgan at 7:21 pm (utc) on June 17, 2008]
[edit reason] example.com [/edit]

jdMorgan

7:33 pm on Jun 17, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Yes, you'll likely take a hit, but as stated, it's not a penalty, but rather that none of your new URLs will have any TrustRank "history."

If that is an example of your new URLs, then consider removing the thrice-redundant "Epson" and using a URL-taxonomy such as

http://example.com/Inkjet-Printer-Cartridges/Epson/Stylus-800/Original-Black-S020039-Twin-Pack-47
Category ----------------------------^
Brand ----------------------------------------------------^
Model ---------------------------------------------------------------^
Item -------------------------------------------------------------------------------------^

Note also that the trailing slash should not be used if this URL refers to a page rather than a directory (folder), and that "+" cannot be used in the URL-path without being encoded to %2B (which looks really ugly in the browser address bar and in search results).

Jim

fzx5v0

1:59 pm on Jun 18, 2008 (gmt 0)

10+ Year Member



ok thanks

instead of re-writing 300 urs by hand am i better just re-writing them back to the homepage as i am going to loose the trust and letting the spider rediscover the site as I am going from 300 products to 6000

thanks

jdMorgan

3:03 pm on Jun 18, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



> instead of re-writing 300 urs by hand am i better just re-writing them back to the homepage as i am going to loose the trust and letting the spider rediscover the site as I am going from 300 products to 6000

No, certainly not! Over time G will figure out that the new URLs are associated with the old ones, and give you some or all of the 'credit' for them back -- It just takes time.

Pointing a bunch of old URLs to a single URL is a good way to create a massive duplicate-content problem (search on that phrase here for more info).

Be very careful with this -- Search engines *hate it* when you change URLs, because it breaks incoming links and obsoletes users' bookmarks. Of course, we're talking about computers here, so they express their displeasure by taking their own sweet time about correlating your new URLs with your old -- It's not a priority for them.

We've got many posts in forums here where people changed all their URLs all at once, and sometimes with technical errors, and almost put themselves out of business. Do not rush, do not 'discard' any page history credit, inbound links, or bookmarks that you can can keep, and test thoroughly using a server headers checker (e.g. Live HTTP Headers add-on for Firefox/Mozilla) to confirm proper operation.

300 product pages is a reasonably-achievable number of redirects. Just be sure that each new page is a spot-on replacement for the old. If you don't have a direct replacement, then use a 410-Gone response (Page was intentionally removed and will not return), and be sure to put text links to your home page, site map, site search, and category pages (as applicable) on your custom 410 error page.

Matt Cutts over at G recommends doing "sections" of your site or "groups" of pages, rather than redirecting all at once. This minimizes the chance that you'll "pull the rug out from under the spider" and cause it to get lost and give up in the new unfamilar URL terrain.

One way to do this is to put the redirects in place on the OLD site: Redirect direct client requests (only) from old URL to new URL, then internally rewrite new URLs back to the old filepath. This allows separation of the URL changes and the content changes, although it does double the number of directives needed for implementation. This can be done with mod_rewrite, using RewriteCond to check the variable %{THE_REQUEST} in order to prevent redirect/rewrite looping.

Jim

fzx5v0

7:21 pm on Jun 18, 2008 (gmt 0)

10+ Year Member



Hi

I have no choice in doing it in one. i am using the same domain name but a different database i can see no other way than doing it all once as i will need the domain name for the new site so i can not split them up

thanks

jdMorgan

9:48 pm on Jun 18, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



OK, if you can't figure out how to map different sets of URLs to different filepaths (they are not at all the same thing) based on what I said above, and thereby to use different scripts and/or databases for different sets of URLs, be prepared for a huge drop in rankings (consider a total loss of natural search listing referrals) for up to a year.

If you can survive such a loss for a sustained period by using other means to drive traffic to your site (e.g. Adwords and other "sponsored" paid-for listings), then go ahead and switch over all at once.

I am not saying this *will* happen to you -- It depends on so many factors that it's nearly impossible to predict. But it *could* happen, and you should plan ahead for it. The reason I stated that you should design your new URLs so that they never (ever) have to change again should be clearer now.

If it were my site, I'd switch from using (for example) one page-generation script to using two -- each one using a different database if necessary. I'd redirect one (sub)set of 'old' URLs to new URLs, and rewrite those new URLs to the new script which uses the new database. For the the other set, I'd leave the old URL to old script rewrite/mapping mechanism in place. If all went well after the first batch of redirects was spidered and successfully updated, then I'd switch another batch old URLs to new URLs.

I don't know the details of your site, its architecture, ranking, or level of competition in its market segment, but I do know that you have a lot of tools available, both in Apache itself and in scripting and database construction. I disagree that you "have no choice" but to switch all URLs at once and caution that *it would* be worth the extra effort to do this carefully, unless you're independently wealthy and this is just a hobby site. We have this advice from one of the top engineers at Google -- someone who understands very well how their algorithm and ranking process reacts to sudden changes. I and others here at WebmasterWorld have issued this caution before; Some take the advice, some don't. Some that don't take the advice come out fine, while others go through a period of reduced or nonexistent sales. So, I could be right or I could be wrong -- it matters little to me. But it should certainly matter to you. :) Be careful: The what looks like the easy path may be fraught with danger.

Best of luck!
Jim