Forum Moderators: phranque

Message Too Old, No Replies

Best way to redirect old links to new site?

how safe is this method?

         

skunker

4:34 pm on Jan 8, 2008 (gmt 0)

10+ Year Member



My website uses a photo gallery script and there are over 2000 photos that each have their own individual page. All of these photos are in a directory called [site.com...] My site is a viral site and therefore I have thousands of incoming links to each of my individual photos.

Since my new site no longer carries those filenames, whats the best way for me to safely redirect new visitors back to my new homepage if click an old link (such as those previously listed in Google, Yahoo, forums, etc).

I used url rewrite on my new site so the new directories are not the same as the old. A friend suggested I use this:

RedirectMatch /gallery/* [SITE.com...]

Does this look SAFE or can I expect some kind of penalty?

jdMorgan

5:44 pm on Jan 8, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



> whats the best way for me to safely redirect new visitors back to my new homepage

The best way is to not do this. You may end up with duplicate content problem.

The best way to do it is to redirect each old URL to each new URL. And an even better way to do it is to never change your URLs -- To be clear, never change any URL ever, unless a lawsuit is forcing you to do so. Done ahead of time, this is not actually difficult, because any URL can point to any filename by using mod_rewrite, and so a URL does not have to be the same or even similar to the filename that it resolves to. The better-designed the URL-architecture is at the beginning, the less likely it is to be difficult to change the underlying file structure in the future.

It is not true that you have to change your URLs, for example, just because you switch from .html to .php and from static to dynamic pages. One single rule can take care of that:


RewriteRule ^([^.]+)\.html$ /script.php?page=$1 [L]

All done, URLs are still the same, but now the entire site technology is different. Search engines and users will see no difference at all, though.

For your case, consider the value of each photo to your traffic/income/PageRank/etc. For at least those that are 'important' put a rewrite or a redirect from the old URL to the new. If you have some that you deem 'worthless' then return a 410-Gone for the old URL. For those in the middle range, consider a redirect to a thumbnail 'category' page or a site-search facility (if you have one).

For best results, each page on your site should be reachable using one URL and one URL only.

For some ideas on site organization and how to avoid changing URLs, see Sir Tim Berners-Lee's seminal article, "Cool URIs don't change" -- Easy to find with a search.

Jim

skunker

5:55 pm on Jan 8, 2008 (gmt 0)

10+ Year Member



jdMOrgan, thanks so much for your response.

I just uploaded the new site and made all these changes yesterday, including submission of a sitemap to Google sitemap utility.

I have a backup system with all the files from myold site. Here's the question:

Do you think I should revert back to the old site IMMEDIATELY and start over and follow the advice you gave?

Do I still have time to revert back or is it too late?