Forum Moderators: phranque
Old blog: www.example.com/blog/
Changed it to: blog.example.com
via 301
The code looks like this:
redirect 301 /blog http://blog.example.com
I thought it did the trick, UNTIL looking in Google's webmaster tools. Its finding 200 errors--all the old, individual posts. It sees them as 404 & 301. Looks very sloppy.
I was told a simple WILD CARD would redirect /blog/ and all of its contents (and anything else) google may look for, to the new subdomain blog.example.com
Any help on this wildcard would be so appreciated.
Thank you
[edited by: jdMorgan at 9:18 pm (utc) on May 27, 2009]
[edit reason] example.com [/edit]
Because the "Redirect" directive uses prefix-matching, a wild-card is exactly what you've got with your current set-up. It will take some time --possibly months-- for the search engines to digest all those 301'ed URLs, so give it some time.
I would suggest including the trailing slashes though:
Redirect 301 /blog/ http://blog.example.com/
However, you will want to investigate those 404 errors. They may be old errors --from before the time that you installed the redirect-- but if not, then you'll need to figure out why those URLs are not being redirected to a valid destination.
Jim
[edited by: jdMorgan at 8:36 pm (utc) on May 27, 2009]
It's important that the initial request for the "bad" old URL is redirected to the final, correct, new URL in one single step, and that the response code is a 301, not a 302 or anything else.
Jim
[edited by: jdMorgan at 9:19 pm (utc) on May 27, 2009]