Forum Moderators: open

Message Too Old, No Replies

.htacess and google

         

Ziggy

12:07 am on Nov 16, 2002 (gmt 0)

10+ Year Member



Hello, i'm new here, and hope that one of you internet-professionals can help me.

i have a site with about 500 *.htm files.

now i have to take down about 400 files. a few are at a good position at google. so there remain about 100 new-named files from them only index.html is listed at google.

so i want to redirect the people who come from google from the old good-indexed links via .htacess to the index.html ,so they dont get a "page not found"

will this ban me from google?
when are the new files indexed aproximatively?
will the old links from google be deleted? and when aprox.?

Thanks a lot

jatar_k

12:47 am on Nov 16, 2002 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Welcome to WebmasterWorld [webmasterworld.com] Ziggy

my first question: why would you take them all down if they rank well? Sounds like crazy talk to me but I assume you have a good reason.

Your questions

will this ban me from google?
No, it is common for files to be moved or renamed. For a permanent move you use a 301 redirect, some links

How to Create 301 error page? [webmasterworld.com]
301 redirect and htaccess [webmasterworld.com]
[httpd.apache.org...]

when are the new files indexed aproximatively?

Patience on this one, I can't give you an exact, I would guess at 1 or 2 full updates but I am not the expert on this.

will the old links from google be deleted? and when aprox.?

They should be replaced with the new filenames but it may take some time, again same as above.

There are a lot more threads around about 301 redirects. You can also use the "site search" in the upper left corner and see what comes up.

jdMorgan

1:25 am on Nov 16, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



ziggy,

Welcome to WebmasterWorld!

I recommend that you make a plan.

For new files which are replacements for the old files, use a 301-Moved Permanently redirect.
For those files which for which you have a "close" replacement, use a 303-See Other redirect.
For those files which are removed and have no replacement, use a 410-Gone redirect.
And finally, set up a custom-404 page to cover screw-ups in the above plan, explain that the requested page is missing, and provide a link to your home page. You may also wish to provide a meta-refresh to your home page on this custom 404 page.

If you need to move files around temporarily, you can use a 302-Moved Temporarily to indicate this. However, users and robots will continue to request the old URLs in this case.

To declare custom error pages, use:


ErrorDocument 404 /404.html
ErrorDocument 410 /410.html

Do not use a full URL on the right side! Use only the local path.

You can then use either of two methods to do the redirection for files which have exact or close replacements:


Redirect permanent old_path new_URL
Redirect seeother old_path new_URL
Redirect gone old_path

Examples:

Redirect permanent /blue_widgets.html http://www.widgets.com/blue_widgets.htm
Redirect seeother /light_blue_widgets.html http://www.widgets.com/blue_widgets.htm
Redirect gone /last_years_widgets_on_sale.html

Alternatively:

RewriteRule ^blue\_widgets\.html$ /blue_widgets.htm [R=permanent,L]
RewriteRule ^light\_blue\_widgets\.html$ /blue_widgets.htm [R=seeother,L]
RewriteRule ^last\_years\_widgets\_on\_sale\.html$ - [R=gone,L]

- or -

RewriteRule ^blue\_widgets\.html$ /blue_widgets.htm [R=301,L]
RewriteRule ^light\_blue\_widgets\.html$ /blue_widgets.htm [R=303,L]
RewriteRule ^last\_years\_widgets\_on\_sale\.html$ - [R=410,L]

The rewrite rule method is better if you need to do pattern-matching and swapping-around of the URL-parts, but describing that would take awhile, so I'll refer you to the Apache documentation [httpd.apache.org] for more details.

With all of the server response codes available to inform the users and robots of what is going on, it is wise to use 404-Not Found only when you forget to properly take care of a removed file. Doing a proper job of it and using the appropriate response codes will save most of your PageRank/LinkPop and at the same time, will not incur a penalty.

HTH,
Jim

jatar_k

1:29 am on Nov 16, 2002 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



very impressive Jim,
put me to shame. ;)

jdMorgan

2:06 am on Nov 16, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Nah!

I couldn't script my way out of a paper sack. ;)

I've just noticed a over-reliance on 302 and 404 response codes. The others are very useful, too!

Jim

Ziggy

11:18 pm on Nov 16, 2002 (gmt 0)

10+ Year Member



WOW thanks to all for your detailed help.

i've a shoppingsystem with aprx 500 items, for every item a file like p_xxx.thml (xxx=number).
This shop is duplicated over 8 domains. ---> 4000 files.

So after one year i decided to remove all items that are not productive. There will remain about 100 items at each domain.

The shop-creating-software doesnt allow to take control over the item-htm-filenames :-((

"Redirect permanent old_path new_URL" would be a lot of work.
the rewrite rule is disabled by my site hoster.

i think to make it via
errordocument 404 /404.htm
and make a 404.htm with a Logo and link to index.html
at robots.txt i'll put a diasalow to 404.htm

And then lets wait till google will re-index the whole page.

Thanks for your constructive help