Forum Moderators: open
one.html
two.html
three.html
that are currently in the main Google index which I have placed meta tags for robots not to index anymore since I updated my site structure like so:
20030201/one.html
20030201/two.html
20030201/three.html
Now instead, I decided to redirect users to those files at their proper location with an .htaccess Redirect command.
When Google crawls my site at one.html (and is then transferred to 20030201/one.html) is it smart enough to realize it's not on one.html anymore and hence drop it from the index next time around or should I leave my original files (actually duplicates) in place for one more cycle with the NOINDEX tags?
Thanks for any input!
Install a 301-Removed Permanently redirect in httpd.conf or .htaccess, and then you are free to remove the old file and replace it with the newly-named version. The redirect will be invoked before any access is made to your server's file system, and Google will never "see" the old file (filename) again. Googlebot will ask for it, the 301 server response will tell it that the page has moved and provide the new URL, and then Googlebot will ask for it again by that new name in a second request.
There is no risk of a duplicate content penalty because there is no duplicate content; even if both files still exists, Googlebot cannot access the old filename if it has been redirected.
<added>Since the 301 redirect will also affect any visitor's browser in the same way described above, it is perfectly safe to remove the old files - As long as you have checked that the 301 response is working properly (I recommend the server header checker here in the stickymail navigation bar).</added>
HTH,
Jim
redirect 301 /olddirectory/file1.html [mydomain...]
redirect 301 /olddirectory/file2.html [mydomain...]
and so on and so on. it redirects around 20 files.
I have no other commands in my .htaccess.
How do i do the Removed Permanently? or will it be ok the way ive done it. I was going to wait until google listed my files in their new directory structure, and then delete the old ones.
Thanks,
chrisandsarah
I could be wrong but I remember having read somewhere that the "redirect 301" was obsolete and that the new "RedirectPermanent" was preferred.
So , instead of:
redirect 301 /olddirectory/file1.html [mydomain...]
you should use:
RedirectPermanent /olddirectory/file1.html [mydomain...]
The last format is automatically returning the 301 header, of course ;)
Dan
<edit>
The Apache documentation states that RedirectPermanent is provided for NCSA compatibility
The three forms:
Redirect 301
Redirect Permanent
RedirectPermanent
are equivalent
</edit>
My mistake - It's actually just 301-Moved Permanently, not 301-Removed Permanently <blush>... Late night, er typo, uh, lost my concentration... Doh!
Once you have installed the Redirects, you can delete the old files - plain and simple. With the Redirects in place, the old files are no longer reachable from the 'net. Any request for an old file gets redirected to the new one. This applies to Google and human visitors, including you. The only way these old files can be seen is by using a non-http protocol - such as ftp - which is not affected by http redirects. Since search engines don't use http to spider, you can safely delete the old files the minute your redirects are in place.
Jim
You install it for when you move a page, say ...
www.domain.tld/old/location/page.htm
to
www.domain.tld/new/location/page.htm
or wherever else you want it. you can't put that in the HTML file because google will go looking for the one in /old/location/, and you setup the server to provide the redirect
now here's a question: would one benefit from modifying the expected 404 response, where a 301 redirect is sent instead?
ie: if somefile.htm doesn't exist, instead of sending the dreaded and annoying 404, do a 301 redirect to the index page, or another relevant page.
redirect permanent /widgets/ [mydomain...]